You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
matplotlib.pyplot.spy does not work correctly for sparse matrices with a large number of entries (>= 2**32). I would guess it has something to do with the value range of int32.
An example that reproduces the bug is:
import numpy as np
import scipy.sparse
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
n = 16
s = 2**n
A = scipy.sparse.coo_matrix(np.ones((s,s), dtype=np.int8))
plt.spy(A)
file = '/tmp/spy_{}.png'.format(n)
plt.savefig(file)
For n = 16, spy shows only some entries.
For n = 15 it works correctly.
I have used Matplotlib 1.5.1 installed over pip with Python 3.5.1 on Linux.
The text was updated successfully, but these errors were encountered:
matplotlib.pyplot.spy does not work correctly for sparse matrices with a large number of entries (>= 2**32). I would guess it has something to do with the value range of int32.
An example that reproduces the bug is:
For n = 16, spy shows only some entries.
For n = 15 it works correctly.
I have used Matplotlib 1.5.1 installed over pip with Python 3.5.1 on Linux.
The text was updated successfully, but these errors were encountered: