-
-
Notifications
You must be signed in to change notification settings - Fork 12.2k
Open
Description
Pulled out from discussions in #8886:
- Preallocate the result array (MAINT: Block algorithm with a single copy per call to
block#11971) - Alias
np.b_[...]tonp.block([...])- shorthands are useful for nesting calls - Implement block destructuring,
np.b_[...] = somearr(comes cheap after preallocation) - Add a
np.block(arr : ndarray[object])overload, that takes an ndarray of blocks that align in all axes (ie, such that the concatenation order does not matter)- add a
grid=Trueparameter to the same effect (ENH: Require that arguments to block lie on a grid eric-wieser/numpy#2)
- add a
- Allow broadcasting
- Extra leading dimensions: With two stacks of arrays,
A.shape == (3, 1, 2, 2),B.shape = (1, 4, 2, 2), shouldnp.block([A, B]).shape == (3,4,2,4)? (currently:ValueError) - All dimensions
- Extra leading dimensions: With two stacks of arrays,
- Deprecate
bmatin favor ofnp.block(...).view(np.matrix)
Reactions are currently unavailable