-
Notifications
You must be signed in to change notification settings - Fork 118
Closed
Description
I thought this problem was eradicated with PR #265. Unfortunately, with really large numbers, the issue still occurs.
activitysim/activitysim/abm/tables/skims.py
Lines 186 to 194 in 7b57c94
| omx_shape = skim_info['omx_shape'] | |
| skim_dtype = skim_info['dtype'] | |
| blocks = skim_info['blocks'] | |
| skim_data = [] | |
| for block_name, block_size in iteritems(blocks): | |
| skims_shape = omx_shape + (block_size,) | |
| block_buffer = skim_buffers[block_name] | |
| assert len(block_buffer) == int(np.prod(skims_shape)) |
The issue is in the Numpy library np.prod() method. According to the documentation:
Arithmetic is modular when using integer types, and no error is raised on overflow.
>>> x = np.array([536870910, 536870910, 536870910, 536870910])
>>> np.prod(x)
16 # may varyMetadata
Metadata
Assignees
Labels
No labels