Skip to content

Commit

Permalink
Replace get_column_view with get_column
Browse files Browse the repository at this point in the history
  • Loading branch information
PrimozGodec committed Feb 8, 2023
1 parent c54a8b4 commit e18430c
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 11 deletions.
2 changes: 1 addition & 1 deletion orangecontrib/prototypes/widgets/owquickselect.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ def commit(self):
annotated = matching = unmatched = None
self.n_matched = None
else:
column = self.data.get_column_view(self.variable)[0]
column = self.data.get_column(self.variable)
valind = self.variable.values.index(self.value)
mask = column == valind
annotated = create_annotated_table(self.data, np.flatnonzero(mask))
Expand Down
2 changes: 1 addition & 1 deletion orangecontrib/prototypes/widgets/owsplit.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def __call__(self, data):
@staticmethod
def get_string_values(data, var):
# turn discrete to string variable
column = data.get_column_view(var)[0]
column = data.get_column(var)
if var.is_discrete:
return [var.str_val(x) for x in column]
return column
Expand Down
2 changes: 1 addition & 1 deletion orangecontrib/prototypes/widgets/tests/test_owsplit.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ def test_split_nonexisting(self):
"""Test splitting when delimiter doesn't exist"""
self.widget.delimiter = "|"
self.send_signal(self.widget.Inputs.data, self.data)
new_cols = set(self.data.get_column_view("Country")[0])
new_cols = set(self.data.get_column("Country"))
self.assertFalse(any(self.widget.delimiter in v for v in new_cols))
self.assertEqual(len(self.get_output(
self.widget.Outputs.data).domain.attributes),
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def include_documentation(local_dir, install_dir):
"orangecontrib.prototypes.widgets": ["icons/*.svg", "tests/*.tab"]
},
install_requires=[
'Orange3>=3.28',
'Orange3>=3.34',
'numpy',
'scipy',
'scikit-learn',
Expand Down
11 changes: 4 additions & 7 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,10 @@ setenv =
deps =
{env:PYQT_PYPI_NAME:PyQt5}=={env:PYQT_PYPI_VERSION:5.15.*}
{env:WEBENGINE_PYPI_NAME:PyQtWebEngine}=={env:WEBENGINE_PYPI_VERSION:5.15.*}
oldest: scikit-learn~=0.22.0
oldest: orange3==3.25.0
# Use newer canvas-core and widget-base to avoid segfaults on windows
oldest: orange-canvas-core==0.1.9 ; sys_platform != 'win32'
oldest: orange-canvas-core==0.1.15 ; sys_platform == 'win32'
oldest: orange-widget-base==4.5.0 ; sys_platform != 'win32'
oldest: orange-widget-base==4.9.0 ; sys_platform == 'win32'
oldest: orange3==3.34.0
oldest: orange-canvas-core==0.1.28
oldest: orange-widget-base==4.19.0
oldest: scikit-learn==1.0.1
latest: https://github.com/biolab/orange3/archive/refs/heads/master.zip#egg=orange3
latest: https://github.com/biolab/orange-canvas-core/archive/refs/heads/master.zip#egg=orange-canvas-core
latest: https://github.com/biolab/orange-widget-base/archive/refs/heads/master.zip#egg=orange-widget-base
Expand Down

0 comments on commit e18430c

Please sign in to comment.