Forum Discussion
FICO
3 years agoCommunity Manager
Unexpected behavior when using xpress.sum over numpy array slice of xpress variables
I have an application using a 4-D numpy array of xpress variables of which I only want to sum two dimensions leaving a 2-D numpy array. This gives a strange behavior (incorrect) for the first term of...
FICO
3 years agoCommunity Manager
Hi Chris,
Thank you for your rapid reply. I was using Xpress 9.02 and NumPy 1.24. I upgraded Xpress to 9.0.4. I was having issues with downgrading Numpy to 1.19, but able to downgrade to 1.20, and am now getting the correct results. Please be aware of this issue for later versions of Numpy.
Thanks!
Related Content
Related Content
xpress.Sum speed and behavior on numpy arrays
As a follow-up to my question posted recently below, please consider the following code snippet: import xpress as xp import numpy as np x = xp.vars(5, 5, 5, name = 'x') sum1 = np.array([xp.Sum([x[:...3 years agoPlace FICO® Xpress Optimization ForumFICO® Xpress Optimization Forum3 unread comments3 unread0Views0likes3Comments- 0Views0likes1Comment
Variable names in callback (Java API)
I construct a cut in a preintsol callback using variables from the model containing the callback. When constructing the model, I give the variables names (using withName(...)) and store them in a vec...9 months agoPlace FICO® Xpress Optimization ForumFICO® Xpress Optimization Forum4 unread comments4 unread1View0likes4Comments