Using numpy.broadcast() on ndarray duck types

Viewed 25

I've been trying to implement my own custom array container using numpy's documentation and I'm having trouble getting numpy.broadcast() to work with my container. I've defined __array_function__ for my custom array container, but it isn't called when using numpy.broadcast().

Is it correct that numpy.broadcast() doesn't use the __array_function__ infrastructure? If so, is there any way to make a custom array container compatible with numpy.broadcast?

0 Answers
Related