nectarchain.data.container.core.get_array_keys#
- get_array_keys(container)[source]#
Return a list of keys corresponding to fields which are array type in the given container.
- Parameters:
container (Container): The container object to search for array fields.
- Returns:
list: A list of keys corresponding to array fields in the container.
- Example:
>>> container = Container() >>> container.field1 = np.array([1, 2, 3]) >>> container.field2 = 5 >>> container.field3 = np.array([4, 5, 6]) >>> get_array_keys(container) ['field1', 'field3']