Given a value, wrap it in a 0-D numpy.ndarray with dtype=object.
(
value: object,
)
| 96 | |
| 97 | |
| 98 | def to_0d_object_array( |
| 99 | value: object, |
| 100 | ) -> NDArray[np.object_]: |
| 101 | """Given a value, wrap it in a 0-D numpy.ndarray with dtype=object.""" |
| 102 | result = np.empty((), dtype=object) |
| 103 | result[()] = value |
| 104 | return result |
| 105 | |
| 106 | |
| 107 | def is_dict_like(value: Any) -> TypeGuard[Mapping[Any, Any]]: |
no test coverage detected
searching dependent graphs…