Open quentinmarolleau opened 3 years ago
Using namedtuple for readability and numpy methods to ensure a well behaved broadcast of arrays.
@QuantumVictor you could try this version, since you apparently had some issues with numpy broadcasting.
Here is a documentation for namedtuple https://realpython.com/python-namedtuple/#creating-tuple-like-classes-with-namedtuple (very useful to keep the functions readable).
namedtuple
EDIT: if it works fine, you can promote it to a genuine Pull-request
Using namedtuple for readability and numpy methods to ensure a well behaved broadcast of arrays.
@QuantumVictor you could try this version, since you apparently had some issues with numpy broadcasting.
Here is a documentation for
namedtuple
https://realpython.com/python-namedtuple/#creating-tuple-like-classes-with-namedtuple (very useful to keep the functions readable).EDIT: if it works fine, you can promote it to a genuine Pull-request