Skip to content

Future warning when writing to lil matrix on numpy master #10405

@thomasjpfan

Description

@thomasjpfan

Future warning when writing to lil matrix.

Reproducing code example:

import scipy.sparse as sp

Y = sp.lil_matrix((3, 4))
Y[:, 1] = 1

Error message:

~/anaconda3/envs/numpy-dev/lib/python3.7/site-packages/scipy/sparse/lil.py:504: 
FutureWarning: future versions will not create a writeable array from broadcast_array. 
Set the writable flag explicitly to avoid this warning.

Scipy/Numpy/Python version information:

1.4.0.dev0+840eb26 
1.18.0.dev0+deea498 
sys.version_info(major=3, minor=7, micro=3, releaselevel='final', serial=0)

Metadata

Metadata

Assignees

No one assigned

    Labels

    duplicateIssues that describe the same problem or that are reported multiple timesscipy.sparse

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions