inducer / arraycontext

Choose your favorite numpy-workalike!
6 stars 11 forks source link

Implement, test container-over-container broadcasting #15

Closed inducer closed 3 years ago

inducer commented 3 years ago

Closes #12

inducer commented 3 years ago

How about that case with flux @ normal broadcasting? Would that just require adding __matmul__ to _BINARY_OP_AND_DUNDER?

Good catch! Implemented and tested in 5622da4. The notation comes out looking bearable IMO.

Although that should really just work on ndarray..

I can't think of any other leaf types that implement __matmul__. Nonetheless, conceivably the operator-type arguments to with_container_arithmetic could conceivably allow type tuples to make them each more picky. I'll save that for when we need it though.