Skip to content

Creating a CSR object can crash the interperter #2748

@eendebakpt

Description

@eendebakpt

Bug Description

The minimal example results in The kernel died, restarting....

Code to Reproduce the Bug

import qutip
print(qutip.__version__)
import numpy as np
from qutip.core.data.csr import CSR
a = np.zeros( (4,1), dtype=complex)
CSR((a, 2, 2))

Code Output

The kernel died, restarting...

Expected Behaviour

An error message should be generated if the input to CSR is incorrect.

Your Environment

QuTiP Version:      5.2.1
Numpy Version:      2.3.3
Scipy Version:      1.16.1
Cython Version:     3.0.12
Matplotlib Version: 3.10.6
Python Version:     3.12.2
Number of CPUs:     12
BLAS Info:          Generic
INTEL MKL Ext:      None
Platform Info:      Windows (AMD64)
Installation path:  C:\develop\env312\Lib\site-packages\qutip

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions