Called by xarray to ensure all arguments to concat have the same dtype.
(*arrays_and_dtypes)
| 114 | |
| 115 | @implements(np.result_type) |
| 116 | def result_type(*arrays_and_dtypes) -> np.dtype: |
| 117 | """Called by xarray to ensure all arguments to concat have the same dtype.""" |
| 118 | first_dtype, *other_dtypes = (np.dtype(obj) for obj in arrays_and_dtypes) |
| 119 | for other_dtype in other_dtypes: |
| 120 | if other_dtype != first_dtype: |
| 121 | raise ValueError("dtypes not all consistent") |
| 122 | return first_dtype |
| 123 | |
| 124 | |
| 125 | @implements(np.broadcast_to) |
nothing calls this directly
no test coverage detected
searching dependent graphs…