Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use reshape and ravel from duck_array_ops in coding/times.py #9225

Merged
merged 2 commits into from
Jul 11, 2024

Conversation

Illviljan
Copy link
Contributor

@Illviljan Illviljan commented Jul 10, 2024

The method .reshape() and .ravel() is not supported by the array api standard, they propose using the function xp.reshape instead. Use the functions from duck_array_ops instead.

Split from #8933

@Illviljan Illviljan changed the title Use duck_array_ops.ravel in coding/times.py Use reshape and ravel from duck_array_ops in coding/times.py Jul 10, 2024
@Illviljan Illviljan marked this pull request as ready for review July 10, 2024 08:07
@Illviljan Illviljan mentioned this pull request Jul 10, 2024
@dcherian dcherian merged commit 7ff5d8d into pydata:main Jul 11, 2024
28 checks passed
dcherian added a commit to dcherian/xarray that referenced this pull request Jul 11, 2024
* main:
  exclude the bots from the release notes (pydata#9235)
  switch the documentation to run with `numpy>=2` (pydata#9177)
  `numpy` 2 compatibility in the iris code paths (pydata#9156)
  `numpy` 2 compatibility in the `netcdf4` and `h5netcdf` backends (pydata#9136)
  Fix time indexing regression in `convert_calendar` (pydata#9192)
  Use duckarray assertions in test_coding_times (pydata#9226)
  Use reshape and ravel from duck_array_ops in coding/times.py (pydata#9225)
  Cleanup test_coding_times.py (pydata#9223)
  Only use necessary dims when creating temporary dataarray (pydata#9206)
  Fix two bugs in DataTree.update() (pydata#9214)
  Use numpy 2.0-compat `np.complex64` dtype in test (pydata#9217)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants