Closed vkrajnak closed 4 years ago
I'll try to find a way around, it makes the code hard to read
solve_ivp accepts matrices
I'll try to find a way around, it makes the code hard to read
Hi @vkrajnak and @VikJGG
To improve readability line breaks can be implemented, as suggested in PEP8 guidelines, here
So, the above code can be rewritten as
v = np.array([
omega * y,
- omega * x
]).T
Although not mentioned in PEP8, an alternative approach might be defining array entries as variables, combined an explicit transposition operator, for instance
v_x = omega * y
v_y = - omega * x
v = np.transpose( np.array([v_x, v_y]) )
What do you guys think?
As for matrix notation, I haven't employed ir myself much, but if that improves readability we can discuss it. Mad love, b
solve_ivp accepts matrices
Raise separate issue for this, please. @vkrajnak
On the contrary, this is the perfect solution to the issue
The function check_arguments
called in the class OdeSolver
requires arguments to be 1-dimensional. Making it work would require digging deep into the integration routine. For now, doing away with some of the transposing will have to do.
Pull request #28
Can you provide an example of where this has been done?