# [SciPy-User] A bug in SLSQP?

4 messages
Open this post in threaded view
|

## [SciPy-User] A bug in SLSQP?

 Dear all, In using scipy.optimize.minimize, I encountered a bug when using bounds. My bounds is set as: bounds = ((0, None), (0, None), (0, 1), (0, None)) Then, it will say invalid value encountered in greater bnderr = where(bnds[:, 0] > bnds[:, 1])[0] I looked into slsqp.py, and in line 330, it checks: if bounds is None or len(bounds) == 0: ... Obviously, bounds is not None, so it did not replace 1e12 or -1e12 into the bnds. Could anyone please help? Thanks! My scipy version: 0.15.1; numpy version: 1.9.2. I am using Windows 64 bit, Python 3.4. Shawn -- Yuxiang "Shawn" Wang Gerling Research Lab University of Virginia [hidden email] +1 (434) 284-0836 https://sites.google.com/a/virginia.edu/yw5aj/_______________________________________________ SciPy-User mailing list [hidden email] http://mail.scipy.org/mailman/listinfo/scipy-user
Open this post in threaded view
|

## Re: A bug in SLSQP?

 Dear all, Oops - sorry. Please disregard my previous email. Even though it complains (the warning), it still filled the xl and xu with the right values. Sorry again for the spamming. Shawn On Tue, May 5, 2015 at 1:41 PM, Yuxiang Wang <[hidden email]> wrote: > Dear all, > > In using scipy.optimize.minimize, I encountered a bug when using bounds. > > My bounds is set as: bounds = ((0, None), (0, None), (0, 1), (0, None)) > > Then, it will say invalid value encountered in greater bnderr = > where(bnds[:, 0] > bnds[:, 1])[0] > > I looked into slsqp.py, and in line 330, it checks: if bounds is None > or len(bounds) == 0: ... > > Obviously, bounds is not None, so it did not replace 1e12 or -1e12 > into the bnds. > > > Could anyone please help? Thanks! > > My scipy version: 0.15.1; numpy version: 1.9.2. I am using Windows 64 > bit, Python 3.4. > > Shawn > > -- > Yuxiang "Shawn" Wang > Gerling Research Lab > University of Virginia > [hidden email] > +1 (434) 284-0836 > https://sites.google.com/a/virginia.edu/yw5aj/-- Yuxiang "Shawn" Wang Gerling Research Lab University of Virginia [hidden email] +1 (434) 284-0836 https://sites.google.com/a/virginia.edu/yw5aj/_______________________________________________ SciPy-User mailing list [hidden email] http://mail.scipy.org/mailman/listinfo/scipy-user