8000 MAINT Removes ReadOnlyWrapper (#25586) · scikit-learn/scikit-learn@28f8c87 · GitHub
[go: up one dir, main page]

Skip to content

Commit 28f8c87

Browse files
authored
MAINT Removes ReadOnlyWrapper (#25586)
1 parent a09a62e commit 28f8c87

File tree

4 files changed

+0
-131
lines changed

4 files changed

+0
-131
lines changed

setup.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,6 @@
120120
"sklearn.utils._logistic_sigmoid",
121121
"sklearn.utils._openmp_helpers",
122122
"sklearn.utils._random",
123-
"sklearn.utils._readonly_array_wrapper",
124123
"sklearn.utils._seq_dataset",
125124
"sklearn.utils._sorting",
126125
"sklearn.utils._typedefs",
@@ -455,7 +454,6 @@ def check_package_status(package, min_version):
455454
},
456455
{"sources": ["_random.pyx"], "include_np": True},
457456
{"sources": ["_logistic_sigmoid.pyx"], "include_np": True},
458-
{"sources": ["_readonly_array_wrapper.pyx"], "include_np": True},
459457
{"sources": ["_typedefs.pyx"], "include_np": True},
460458
{"sources": ["_heap.pyx"], "include_np": True},
461459
{"sources": ["_sorting.pyx"], "include_np": True},

sklearn/utils/_readonly_array_wrapper.pyx

Lines changed: 0 additions & 67 deletions
This file was deleted.

sklearn/utils/tests/test_readonly_wrapper.py

Lines changed: 0 additions & 41 deletions
This file was deleted.

sklearn 10000 /utils/tests/test_testing.py

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111

1212
from sklearn.utils.deprecation import deprecated
1313
from sklearn.utils.metaestimators import available_if, if_delegate_has_method
14-
from sklearn.utils._readonly_array_wrapper import _test_sum
1514
from sklearn.utils._testing import (
1615
assert_raises,
1716
assert_no_warnings,
@@ -680,26 +679,6 @@ def test_create_memmap_backed_data(monkeypatch, aligned):
680679
create_memmap_backed_data([input_array, "not-an-array"], aligned=True)
681680

682681

683-
@pytest.mark.parametrize("dtype", [np.float32, np.float64, np.int32, np.int64])
684-
def test_memmap_on_contiguous_data(dtype):
685-
"""Test memory mapped array on contiguous memoryview."""
686-
x = np.arange(10).astype(dtype)
687-
assert x.flags["C_CONTIGUOUS"]
688-
assert x.flags["ALIGNED"]
689-
690-
# _test_sum consumes contiguous arrays
691-
# def _test_sum(NUM_TYPES[::1] x):
692-
sum_origin = _test_sum(x)
693-
694-
# now on memory mapped data
695-
# aligned=True so avoid https://github.com/joblib/joblib/issues/563
696-
# without alignment, this can produce segmentation faults, see
697-
# https://github.com/scikit-learn/scikit-learn/pull/21654
698-
x_mmap = create_memmap_backed_data(x, mmap_mode="r+", aligned=True)
699-
sum_mmap = _test_sum(x_mmap)
700-
assert sum_mmap == pytest.approx(sum_origin, rel=1e-11)
701-
702-
703682
@pytest.mark.parametrize(
704683
"constructor_name, container_type",
705684
[

0 commit comments

Comments
 (0)
0