Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix read, seek with numpy integer sizes #1927

Merged
merged 1 commit into from Mar 18, 2024
Merged

Fix read, seek with numpy integer sizes #1927

merged 1 commit into from Mar 18, 2024

Conversation

ihnorton
Copy link
Member

Fix read, seek with numpy integer sizes

@ihnorton ihnorton requested a review from ktsitsi March 17, 2024 15:32
@ktsitsi
Copy link

ktsitsi commented Mar 17, 2024

I am testing the change in my local build just to make sure that everything works fine. And if so I will approve.

@ktsitsi
Copy link

ktsitsi commented Mar 17, 2024

(.venv) (base) ktsitsi$ pip freeze | grep "tiledb"                                                     
napari-tiledb-bioimg==0.0.1
tiledb==0.26.3
-e git+https://github.com/TileDB-Inc/TileDB-BioImaging.git@f8365af24eb00714f851fef4a5b29993df7283b0#egg=tiledb_bioimg
tiledb-cloud==0.10.5
(.venv) (base) ktsitsi$ python --version                                                               
Python 3.9.16
(.venv) (base) ktsitsi$ sed -n 421p TileDB-BioImaging/.venv/lib/python3.9/site-packages/tiledb/vfs.py
        if not np.issubdtype(type(offset), np.integer):
(.venv) (base) ktsitsi$ sed -n 462p TileDB-BioImaging/.venv/lib/python3.9/site-packages/tiledb/vfs.py
        if not np.issubdtype(type(size), np.integer):
(.venv) (base) ktsitsi$ cat test_python.py                                                   
from tiledb.bioimg import from_bioimg
from tiledb.bioimg.types import Converters
from tiledb import VFS
import tiledb


def main():
    vfs = tiledb.VFS()
    with vfs.open('/Users/konstantinostsitsimpikos/tiledb_dev/TileDB-BioImaging/tests/data/CMU-1.ndpi') as src:
        from_bioimg(src, '/Users/konstantinostsitsimpikos/tiledb_dev/TileDB-BioImaging/tests/data/CMU-1-isaiah.tdb', converter=Converters.OMETIFF)
    print("Ingested!")

if __name__ == "__main__":
    main()
(.venv) (base) ktsitsi$ python test_python.py                                                        
Ingesting level 0: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1900/1900 [01:03<00:00, 29.78tiles/s]
Ingesting level 1: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 130/130 [00:02<00:00, 43.58tiles/s]
Ingesting level 2: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 12/12 [00:00<00:00, 49.32tiles/s]
Ingesting level 3: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:00<00:00, 53.20tiles/s]
Ingested!
(.venv) (base) ktsitsi$ ls -l /Users/konstantinostsitsimpikos/tiledb_dev/TileDB-BioImaging/tests/data/CMU-1-isaiah.tdb 
total 0
drwxr-xr-x  3 konstantinostsitsimpikos  staff   96 Mar 17 17:58 __group
drwxr-xr-x  3 konstantinostsitsimpikos  staff   96 Mar 17 17:58 __meta
-rw-r--r--  1 konstantinostsitsimpikos  staff    0 Mar 17 17:55 __tiledb_group.tdb
drwxr-xr-x  8 konstantinostsitsimpikos  staff  256 Mar 17 17:55 l_0.tdb
drwxr-xr-x  8 konstantinostsitsimpikos  staff  256 Mar 17 17:58 l_1.tdb
drwxr-xr-x  8 konstantinostsitsimpikos  staff  256 Mar 17 17:58 l_2.tdb
drwxr-xr-x  8 konstantinostsitsimpikos  staff  256 Mar 17 17:58 l_3.tdb
(.venv) (base) ktsitsi$ du -h /Users/konstantinostsitsimpikos/tiledb_dev/TileDB-BioImaging/tests/data/CMU-1-isaiah.tdb | tail -n 1
1.5G	/Users/konstantinostsitsimpikos/tiledb_dev/TileDB-BioImaging/tests/data/CMU-1-isaiah.tdb

Copy link

@ktsitsi ktsitsi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ihnorton ihnorton merged commit a80f297 into dev Mar 18, 2024
28 checks passed
@ihnorton ihnorton deleted the ihn/fix-readinto branch March 18, 2024 02:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants