Skip to content

Commit

Permalink
Merge pull request #189 from MannLabs/windowsfix
Browse files Browse the repository at this point in the history
windowsfix for np.int64
  • Loading branch information
jalew188 authored Jun 28, 2024
2 parents ca05c60 + 3b55654 commit 14fc163
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions alphabase/io/tempmmap.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ def array(shape: tuple, dtype: np.dtype, tmp_dir_abs_path: str = None) -> np.nda
_change_temp_dir_location(tmp_dir_abs_path)

temp_file_name = os.path.join(
TEMP_DIR_NAME, f"temp_mmap_{np.random.randint(2**63)}.hdf"
TEMP_DIR_NAME, f"temp_mmap_{np.random.randint(2**63, dtype=np.int64)}.hdf"
)

with h5py.File(temp_file_name, "w") as hdf_file:
Expand Down Expand Up @@ -218,7 +218,7 @@ def create_empty_mmap(
# if path does not exist generate a random file name in the TEMP directory
if file_path is None:
temp_file_name = os.path.join(
TEMP_DIR_NAME, f"temp_mmap_{np.random.randint(2**63)}.hdf"
TEMP_DIR_NAME, f"temp_mmap_{np.random.randint(2**63, dtype=np.int64)}.hdf"
)
else:
temp_file_name = _get_file_location(file_path, overwrite=False)
Expand Down

0 comments on commit 14fc163

Please sign in to comment.