You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* replace the use of `numpy.array_api` with `array_api_strict`
This would make it a dependency of `namedarray`, and not allow
behavior that is allowed but not required by the array API standard. Otherwise we can:
- use the main `numpy` namespace
- use `array_api_compat` (would also be a new dependency) to allow
optional behavior
* replace `numpy.array_api` with `array_api_strict` in the tests
* replace the use of the removed `nxp` with just plain `numpy`
* directly pass the `numpy` dtype
* replace `dtype.type` with `type(dtype)` for `isnull`
* use a new function to compare dtypes
* use `array_api_strict`'s version of `int64`
* use `array_api_strict`'s dtypes when interacting with its `Array` class
* Revert the (unintentional) switch to `mamba` [skip-ci]
* use the array API in `result_type`
* skip modifying the casting rules if no numpy dtype is involved
* don't use isdtype for modules that don't have it
* allow mixing numpy arrays with others
This is not explicitly allowed by the array API specification (it was
declared out of scope), so I'm not sure if this is the right way to do this.
* use the array api to implement `nbytes`
* refactor `isdtype`
* refactor `isdtype` to be a more general dtype checking mechanism
* replace all `dtype.kind` calls with `dtypes.isdtype`
* use the proper dtype kind
* use `_get_data_namespace` to get the array api namespace
* explicitly handle `bool` when determining the item size
* prefer `itemsize` over the array API's version
* add `array-api-strict` as a test dep to the bare-minimum environment
* ignore the redefinition of `nxp`
* move the array api duck array check into a separate test
This allows skipping it if the import fails (and we don't have to add
it to the `bare-minimum` ci).
* remove `extract_dtype`
* try comparing working around extension dtypes
* change the `nbytes` test to more clearly communicate the intention
* remove the deprecated dtype alias `"a"`
* refactor to have different code paths for numpy dtypes and others
* use `isdtype` for all other dtype checks in `xarray.core.dtypes`
* use the proper kinds
* remove the now unused "always tuple" branch in `split_numpy_kinds`
* raise an error on invalid / unknown kinds
* add tests for `isdtype`
* pass in the iterable version of `kind`
* remove the array api check
* remove the unused `requires_pandas_version_two`
* add `bool` to the dummy namespace
* actual make the extension array dtype test check something
* actually make the extension array dtype check work
* adapt the name of the wrapped array
* remove the dtype for those examples that use the default dtype
* filter out the warning raised by importing `numpy.array_api`
* move the `pandas` isdtype check to a different function
* mention that we can remove `numpy_isdtype` once we require `numpy>=2.0`
* use an enum instead
* make `isdtype` simpler
* comment on the empty pandas_isdtype
* drop `pandas_isdtype` in favor of a simple `return `False`
* move the dtype kind verification to `numpy_isdtype`
`xp.isdtype` should already check the same thing.
* fall back to `numpy.isdtype` if `xp` is not passed
* move `numpy_isdtype` to `npcompat`
* typing
* fix a type comment
* additional code comments
Co-authored-by: Stephan Hoyer <[email protected]>
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* more typing
* raise a `TypeError` as `numpy.isdtype` does
* also allow tuples of strings as kind
* invert the condition
* final fix, hopefully
* next attempt
* raise a `ValueError` for unknown dtype kinds
* split out the tests we expect to raise into a separate function
* add another expected failing test
---------
Co-authored-by: Deepak Cherian <[email protected]>
Co-authored-by: Stephan Hoyer <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
0 commit comments