|
lbound = scipy.zeros(self.nparams) |
In this section:
lbound = scipy.zeros(self.nparams) ubound = scipy.ones(self.nparams)
You can improve clarity and performance by using:
lbound = numpy.zeros(self.nparams) ubound = numpy.ones(self.nparams)
These scipy functions are just thin wrappers around numpy.zeros() and numpy.ones(), adding unnecessary overhead and reducing code readability. It’s better to use the native NumPy functions directly, which are the standard across modern Python numerical computing codebases.
pycircuit/pycircuit/optimize.py
Line 38 in 4b44ec3
In this section:
lbound = scipy.zeros(self.nparams) ubound = scipy.ones(self.nparams)You can improve clarity and performance by using:
lbound = numpy.zeros(self.nparams) ubound = numpy.ones(self.nparams)These scipy functions are just thin wrappers around numpy.zeros() and numpy.ones(), adding unnecessary overhead and reducing code readability. It’s better to use the native NumPy functions directly, which are the standard across modern Python numerical computing codebases.