-
-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Require Orange 3.34 * Update tox.ini * Update tox.ini --------- Co-authored-by: Primož Godec <[email protected]>
- Loading branch information
1 parent
dce7028
commit e74dbaa
Showing
4 changed files
with
7 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,6 @@ | ||
from os.path import join, dirname | ||
from Orange.data.table import dataset_dirs | ||
from Orange.data import Table | ||
|
||
|
||
dataset_dirs.insert(0, join(dirname(__file__), "datasets")) | ||
del join, dirname, dataset_dirs | ||
|
||
|
||
# Remove this when we require Orange 3.34 | ||
if not hasattr(Table, "get_column"): | ||
import scipy.sparse as sp | ||
import numpy as np | ||
|
||
def get_column(self, column): | ||
col, _ = self.get_column_view(column) | ||
if sp.issparse(col): | ||
col = col.toarray().reshape(-1) | ||
if self.domain[column].is_primitive(): | ||
col = col.astype(np.float64) | ||
return col | ||
|
||
Table.get_column = get_column |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters