diff --git a/asdf/_tests/test_generic_io.py b/asdf/_tests/test_generic_io.py index b92047b00..921305950 100644 --- a/asdf/_tests/test_generic_io.py +++ b/asdf/_tests/test_generic_io.py @@ -112,7 +112,7 @@ def get_read_fd(): with _roundtrip(tree, get_write_fd, get_read_fd) as ff: assert len(ff._blocks.blocks) == 2 - assert isinstance(ff._blocks.blocks[0].cached_data, np.core.memmap) + assert isinstance(ff._blocks.blocks[0].cached_data, np.memmap) def test_open2(tree, tmp_path): @@ -135,7 +135,7 @@ def get_read_fd(): with _roundtrip(tree, get_write_fd, get_read_fd) as ff: assert len(ff._blocks.blocks) == 2 - assert isinstance(ff._blocks.blocks[0].cached_data, np.core.memmap) + assert isinstance(ff._blocks.blocks[0].cached_data, np.memmap) @pytest.mark.parametrize("mode", ["r", "w", "rw"]) @@ -172,7 +172,7 @@ def get_read_fd(): with _roundtrip(tree, get_write_fd, get_read_fd) as ff: assert len(ff._blocks.blocks) == 2 - assert isinstance(ff._blocks.blocks[0].cached_data, np.core.memmap) + assert isinstance(ff._blocks.blocks[0].cached_data, np.memmap) ff.tree["science_data"][0] = 42 @@ -208,7 +208,7 @@ def get_read_fd(): with _roundtrip(tree, get_write_fd, get_read_fd) as ff: assert len(ff._blocks.blocks) == 2 - assert not isinstance(ff._blocks.blocks[0].cached_data, np.core.memmap) + assert not isinstance(ff._blocks.blocks[0].cached_data, np.memmap) ff.tree["science_data"][0] = 42 @@ -224,7 +224,7 @@ def get_read_fd(): with _roundtrip(tree, get_write_fd, get_read_fd) as ff: assert len(ff._blocks.blocks) == 2 - assert not isinstance(ff._blocks.blocks[0].cached_data, np.core.memmap) + assert not isinstance(ff._blocks.blocks[0].cached_data, np.memmap) ff.tree["science_data"][0] = 42 @@ -252,7 +252,7 @@ def get_read_fd(): with _roundtrip(tree, get_write_fd, get_read_fd) as ff: assert len(ff._blocks.blocks) == 2 - assert not isinstance(ff._blocks.blocks[0].cached_data, np.core.memmap) + assert not isinstance(ff._blocks.blocks[0].cached_data, np.memmap) @pytest.mark.remote_data() diff --git a/asdf/generic_io.py b/asdf/generic_io.py index 128a4af73..f4cb42d9d 100644 --- a/asdf/generic_io.py +++ b/asdf/generic_io.py @@ -637,7 +637,7 @@ def clear(self, nbytes): def memmap_array(self, offset, size): """ - Memmap a chunk of the file into a `np.core.memmap` object. + Memmap a chunk of the file into a `np.memmap` object. Parameters ---------- @@ -649,7 +649,7 @@ def memmap_array(self, offset, size): Returns ------- - array : np.core.memmap + array : np.memmap """ msg = f"memmapping is not implemented for {self.__class__.__name__}" raise NotImplementedError(msg) @@ -680,7 +680,7 @@ def read_into_array(self, size): Returns ------- - array : np.core.memmap + array : np.memmap """ buff = self.read(size) return np.frombuffer(buff, np.uint8, size, 0)