Skip to content

Add helper for getting array namespace from an array#1085

Open
msimberg wants to merge 2 commits intoC2SM:mainfrom
msimberg:array-ns-from-array
Open

Add helper for getting array namespace from an array#1085
msimberg wants to merge 2 commits intoC2SM:mainfrom
msimberg:array-ns-from-array

Conversation

@msimberg
Copy link
Contributor

@msimberg msimberg commented Mar 2, 2026

Extracting from two PRs that implemented the same:

@jcanton I liked your implementation, but (slightly) prefer my name. Feel free to bikeshed.

@github-actions
Copy link

github-actions bot commented Mar 2, 2026

Mandatory Tests

Please make sure you run these tests via comment before you merge!

  • cscs-ci run default
  • cscs-ci run distributed

Optional Tests

To run benchmarks you can use:

  • cscs-ci run benchmark-bencher

To run tests and benchmarks with the DaCe backend you can use:

  • cscs-ci run dace

To run test levels ignored by the default test suite (mostly simple datatest for static fields computations) you can use:

  • cscs-ci run extra

For more detailed information please look at CI in the EXCLAIM universe.

return np


def array_ns_from_array(array: NDArray) -> ModuleType:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
def array_ns_from_array(array: NDArray) -> ModuleType:
def get_array_ns_from_array(array: NDArray) -> ModuleType:

to keep in line with (Magda's?) get/compute/apply

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I must say I don't love adding get etc. everywhere, but I don't object. If you prefer adding it let's do it.

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