pysdic.core.property_container.PropertyContainer.reshape#
- PropertyContainer.reshape(key, new_shape)[source]#
Reshape the attributes of a property, keeping the first dimension \(N\).
For example, a property of shape \((N, 9)\) can be reshaped to \((N, 3, 3)\) with
new_shape=(3, 3).- Parameters:
- Raises:
ValueError – If the number of attributes changes, or if the new shape is not 2D while
force_2dis enabled.- Return type:
None