Comments (1)
I think the most we'd want to do is raise an error saying x = x + expression
. The idea of an in-place assignment on a numerical array with changing data types doesn't even make sense. Consider the following code as a non-cvxpy example:
>>> import numpy as np
>>> a = np.array([0],'d')
>>> a
array([0.])
>>> a += 1j
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
numpy.core._exceptions._UFuncOutputCastingError: Cannot cast ufunc 'add' output from dtype('complex128') to dtype('float64') with casting rule 'same_kind'
I suggest we look into adding an informative error message to help users who try to do this. Until we get around to that, I suggest we change the title of this GitHub issue.
Oh, and one more thing, @PTNobel. I believe you're either using cvxpy 1.4.1 or you're using the version on master (1.5.0+commit identifier).
from cvxpy.
Related Issues (20)
- Adverse interaction between multiprocessing.Pool and cvxpy PSD constraints HOT 1
- Why a scalar multiply a Hermitian matrix isn't be a Hermitian matrix
- Why a real-valued scalar multiply a Hermitian matrix isn't be a Hermitian matrix? HOT 2
- Mac M3: unexpected exception importing solver CBC HOT 6
- Bug/error with DQCP problem HOT 2
- "ValueError: The denominator's sign must be known." recieved in canonicalization step of DQCP HOT 11
- Is there a way to add new atomic functions HOT 8
- Customize solver preference order HOT 3
- Huge memory consumption in `cp.sum(list)` HOT 1
- Large discrepacy between optimal solution and DQCP solution HOT 12
- Wheels compatible with Numpy 2.0 HOT 11
- add topic tags HOT 6
- Unexpected handling of coefficient that could be zero in version 1.4.x HOT 9
- Take the derivative of the unknown variables HOT 1
- `cvxpy` cannot be imported in python 3.12 HOT 2
- `value.A` is deprecated and will be removed in scipy 1.14.0 HOT 9
- Write a guide on how to add a new atom HOT 4
- Many tests fail HOT 3
- Solver 'CVXOPT' failed when solving LP HOT 3
- XPRESS release breaks tests
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cvxpy.