Function
columnar_array
(component_type, n_components, attributes=None, batch_size_tuple=())
Source from the content-addressed store, hash-verified
| 18 | |
| 19 | |
| 20 | def columnar_array(component_type, n_components, attributes=None, batch_size_tuple=()): |
| 21 | component_dtype = power_grid_meta_data[DT.sym_output][component_type].dtype |
| 22 | required_attributes = ( |
| 23 | set(component_dtype.names) & set(attributes) if attributes is not None else component_dtype.names |
| 24 | ) |
| 25 | return { |
| 26 | attr: np.empty((n_components, *batch_size_tuple), dtype=component_dtype[attr]) for attr in required_attributes |
| 27 | } |
| 28 | |
| 29 | |
| 30 | def row_array(component_type, n_components, batch_size_tuple=()): |
Callers
nothing calls this directly
Tested by
no test coverage detected