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
* Fix issue with NumPy chain and preallocation=0
Original logic in `grow_append` was to extend data by 10% of its length.
This is a problem with the original data length is 0, since it then
never extends.
This commit amends `grow_append` to always extend by at least 10 elements.
* [NumPyBackend] Prevent ``preallocate=0`` from creating object arrays.
`grow_append` cannot know if ``preallocate = 0`` was used: it only
looks at the `rigid` value to determine how to append.
Because of this, will always fail when we use `preallocate = 0` with
tensor variables, since then the shapes of `target` and `extension`
don’t match.
A simple fix is to simply deactivate the special behavior for
`preallocate = 0`.
- This commit extends `test_growing` with a `preallocate` parameter,
so that we test both cases where it is 0 and positive.
- We also fix `test_growing` to match the new behavior of `grow_append`
introduced in #ea812b0, where data arrays always grow by at least 10.
* Remove trailing whitespace
---------
Co-authored-by: Alexandre René <[email protected]>
Co-authored-by: Michael Osthege <[email protected]>
0 commit comments