pysdic.core.property_container.PropertyContainer.from_dict#
- classmethod PropertyContainer.from_dict(data, *, N=None, force_2d=False)[source]#
Create a container from a dictionary of properties.
- Parameters:
data (Dict[str, ArrayLike]) – A dictionary mapping the property names to arrays of shape \((N, \dots)\).
N (Integral, optional) – The number of entities. By default, it is inferred from the first property of
data, which is then required to be non-empty.force_2d (bool, optional (default:
False)) – If True, all properties are stored as 2D arrays of shape \((N, P)\).
- Returns:
A new container with the properties of
data.- Return type: