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

Numpy array context rebased #190

Merged
merged 32 commits into from
Sep 4, 2024
Merged

Numpy array context rebased #190

merged 32 commits into from
Sep 4, 2024

Commits on Aug 25, 2024

  1. Configuration menu
    Copy the full SHA
    14d4476 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    ee96ff5 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    0c24aad View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    02ab097 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    c888489 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    cd124ba View commit details
    Browse the repository at this point in the history
  7. Deprecate with_container_arithmetic's bcast_numpy_array arg

    Passing both 'bcast_numpy_array' and '_bcast_actx_array_types' was
    ill-defined. For example, in the case of an ArrayContext whose thawed
    array type is np.ndarray the specification would contradict between
    broadcasting the argument numpy_array to return an object array *OR*
    peforming the operation with every leaf array.
    
    Consider the example below,
    
    (
    - 'Foo: ArrayContainer' whose arithmetic routines are
       generated by `with_container_arithmetic(bcast_numpy=True,
       _bcast_actx_array_types=True)`
    - 'actx: ArrayContextT' for whom `np.ndarray` is a valid thawed array
       type.
    )
    
    Foo(DOFArray(actx, [38*actx.ones(3, np.float64)])) + np.array([3, 4, 5])
    could be either of:
    - array([Foo(DOFArray([array([41, 41, 41])])),
             Foo(DOFArray([array([42, 42, 42])])),
             Foo(DOFArray([array([43, 43, 43])]))]), OR,
    - Foo(DOFArray(actx, array([41, 42, 43])))
    kaushikcfd authored and inducer committed Aug 25, 2024
    Configuration menu
    Copy the full SHA
    5d8158d View commit details
    Browse the repository at this point in the history
  8. Implements NumpyArrayContext

    kaushikcfd authored and inducer committed Aug 25, 2024
    Configuration menu
    Copy the full SHA
    228ef16 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    1dc8c94 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    51b46bd View commit details
    Browse the repository at this point in the history
  11. test NumpyArrayContext

    kaushikcfd authored and inducer committed Aug 25, 2024
    Configuration menu
    Copy the full SHA
    6308dc1 View commit details
    Browse the repository at this point in the history
  12. test tweaks for NumpyArrayContext

    kaushikcfd authored and inducer committed Aug 25, 2024
    Configuration menu
    Copy the full SHA
    b5ea270 View commit details
    Browse the repository at this point in the history
  13. Numpy actx: add arange, linspace

    matthiasdiener authored and inducer committed Aug 25, 2024
    Configuration menu
    Copy the full SHA
    80c0672 View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    6d3b02a View commit details
    Browse the repository at this point in the history
  15. Numpy actx: better freeze/thaw

    matthiasdiener authored and inducer committed Aug 25, 2024
    Configuration menu
    Copy the full SHA
    4125e02 View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    5da96a8 View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    aa53572 View commit details
    Browse the repository at this point in the history
  18. Configuration menu
    Copy the full SHA
    cf3f4fb View commit details
    Browse the repository at this point in the history
  19. Configuration menu
    Copy the full SHA
    1af76ce View commit details
    Browse the repository at this point in the history
  20. Configuration menu
    Copy the full SHA
    b58e38e View commit details
    Browse the repository at this point in the history
  21. Configuration menu
    Copy the full SHA
    eca314f View commit details
    Browse the repository at this point in the history
  22. Configuration menu
    Copy the full SHA
    4b4ee86 View commit details
    Browse the repository at this point in the history
  23. Configuration menu
    Copy the full SHA
    3d36c07 View commit details
    Browse the repository at this point in the history
  24. Configuration menu
    Copy the full SHA
    58acd1f View commit details
    Browse the repository at this point in the history

Commits on Sep 4, 2024

  1. Rework dataclass array container arithmetic

    - Deprecate automatic broadcasting of array context arrays
    - Warn about uses of numpy array broadcasting, deprecated earlier
    - Clarify documentation, warning wording
    inducer committed Sep 4, 2024
    Configuration menu
    Copy the full SHA
    0feaae1 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    4873ef4 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    74cd298 View commit details
    Browse the repository at this point in the history
  4. Fix ruff C409 failures

    inducer committed Sep 4, 2024
    Configuration menu
    Copy the full SHA
    125e936 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    9f1cad4 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    8b1b795 View commit details
    Browse the repository at this point in the history
  7. with_container_arithmetic: Rename arguments to signal who broadcasts …

    …across who
    
    Names suggested by @majosm
    inducer committed Sep 4, 2024
    Configuration menu
    Copy the full SHA
    510dc1b View commit details
    Browse the repository at this point in the history
  8. Numpy actx: cache execuctor

    inducer committed Sep 4, 2024
    Configuration menu
    Copy the full SHA
    bc323fc View commit details
    Browse the repository at this point in the history