You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In Events.get_extended_events(return_array=True) astroCAST creates an array of size num_events * num_frames. This is only efficient if the events are extended over the full num_frames, but creates an array with mostly np.nan values if a fixed extension window is chosen.
ifmemmap_path:
# todo only size that we need?memmap_path=Path(memmap_path).with_suffix(f".dtype_{np.dtype(dtype).name}_shape_{n_events}x{n_frames}.mmap")
arr_ext=np.memmap(memmap_path.as_posix(), dtype=dtype, mode='w+', shape=(n_events, n_frames))
else:
arr_ext=np.zeros((n_events, n_frames), dtype=dtype)
A more efficient solution would be to get the maximum event length after extension and create an array of this size instead.
The text was updated successfully, but these errors were encountered:
In
Events.get_extended_events(return_array=True)
astroCAST creates an array of sizenum_events * num_frames
. This is only efficient if the events are extended over the fullnum_frames
, but creates an array with mostly np.nan values if a fixed extension window is chosen.A more efficient solution would be to get the maximum event length after extension and create an array of this size instead.
The text was updated successfully, but these errors were encountered: