Skip to content

Implements a Numpy-based ArrayContext - #93

Closed
kaushikcfd wants to merge 8 commits into
inducer:mainfrom
kaushikcfd:numpy_array_context
Closed

Implements a Numpy-based ArrayContext#93
kaushikcfd wants to merge 8 commits into
inducer:mainfrom
kaushikcfd:numpy_array_context

Conversation

@kaushikcfd

@kaushikcfdkaushikcfd commented Sep 27, 2021

Copy link
Copy Markdown
Collaborator

@kaushikcfd
kaushikcfdforce-pushed the numpy_array_context branch 4 times, most recently from 15c08c9 to bfe6125CompareSeptember 27, 2021 14:50
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])))
@inducerinducer mentioned this pull request Jun 24, 2022
12 tasks
@inducerinducer mentioned this pull request Sep 1, 2022
1 task
@matthiasdienermatthiasdiener mentioned this pull request Jun 20, 2023
Sign up for freeto 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.

1 participant

@kaushikcfd