convexengineering / gpfit

Fit posynomials to data
http://gpfit.readthedocs.io/en/latest/
MIT License
10 stars 7 forks source link

'FitCS' object has no attribute 'left' #90

Closed Alexander-Da-Great closed 3 years ago

Alexander-Da-Great commented 4 years ago

When calling plot_fit_1d() I receive an error on line 27 with the call wexps, = cstrt.left.exps. The error reads: AttributeError: 'FitCS' object has no attribute 'left'

MWE:

X = np.linspace(0.1, 2.0, 10)
Y = np.sqrt(X**2 + (1-X)**2)
K = 2
f, ax = plot_fit_1d(X, Y, K, fitclass = 'SMA')

Full Traceback:

Traceback (most recent call last):
  File "180412_ac_current.py", line 25, in <module>
    f, ax = plot_fit_1d(X, Y, K, fitclass = 'SMA')
  File "/Users/alexander.greer/Documents/Optimization/gpfit/gpfit/plot_fit.py", line 27, in plot_fit_1d
    wexps, = cstrt.left.exps
AttributeError: 'FitCS' object has no attribute 'left'