You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
it looks like adding type promotion np.promote_types(float, x.dtype)) broke numdiff for lists
(no explicit example because in an example a class called fprime with list params (only one value)
\statsmodels\statsmodels_py37_main\statsmodels\statsmodels\tools\numdiff.py in approx_fprime(x, f, epsilon, args, kwargs, centered)
143 f0 = f(*((x,)+args), **kwargs)
144 dim = np.atleast_1d(f0).shape # it could be a scalar
--> 145 grad = np.zeros((n,) + dim, np.promote_types(float, x.dtype))
146 ei = np.zeros((n,), float)
147 if not centered:
AttributeError: 'list' object has no attribute 'dtype'
Activity
BUG: fprime requires ndarray now see statsmodels#8128
bashtage commentedon Feb 21, 2022
Doesn't look like a bug to me.
approx_fprimeexpected x to be andarray.[-]BUG: approx_fprime broken with list[/-][+]ENH: let approx_fprime accept list[/+]BUG: fprime requires ndarray now see statsmodels#8128