Skip to content

Conversation

connoraird
Copy link
Contributor

@connoraird connoraird commented Oct 17, 2025

Description

Reduced reliance on importing numpy and glass.jax and added wrapper for importing numpy to provide a helpful message to the user. Also added detailed docstrings to _array_api_utils

this was split out from PR-677

Closes: #679

Changelog entry

Changed: How we import numpy and glass.jax in glass._array_api_utils so that we no longer explicitly depend on either of them. If numpy is incorrectly imported, a helpful error message will be provided to the user. This will hopefully reduce confusion if a user suddenly requires numpy just because they called a specific function.

Checks

  • Is your code passing linting?
  • Is your code passing tests?
  • Have you added additional tests (if required)?
  • Have you modified/extended the documentation (if required)?
  • Have you added a one-liner changelog entry above (if required)?

…strings to all functions and classes in _array_api_utils
@connoraird connoraird requested a review from paddyroddy October 17, 2025 16:46
@connoraird connoraird self-assigned this Oct 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

array-api Work is related to the Array API

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove requirement for NumPy to be imported by default in _array_api_utils

1 participant