forallpeople
forallpeople copied to clipboard
Error when multiplying arrays
Hey, I recently got this error when attempting to multiply a numpy array by a scalar "forallpeople.Physical" object It seems like I can multiply two numpy arrays but not a scalar and array.
This might be expected behavior, if it's not I thought I would mention it:
Vector multiplication works:
Hi Christian (@cslotboom),
Thanks for bringing this up. It is a problem that I am aware of. In the short-term, does changing the order of multiplication work?
e.g. (F*height)
instead of (height*F)
Hey Connor! Thanks for your reply.
I've since changed around my example a bit, but in general changing the order seems to work.
The issue only seems to occur when printing too.
All the lines work except for the last one
The next major version of forallpeople
will look to incorporate numpy ufuncs for full and proper numpy compatibility. Don't have a timeline yet but it will certainly be this year.
@cslotboom Or maybe in 2023...? It's still very much on my mind.