We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
from https://bitbucket.org/apdavison/lazyarray/issues/1/support-creating-lazy-arrays-from-scipy
Examples:
>>> row = np.array([0, 2, 2, 0, 1, 2]) >>> col = np.array([0, 0, 1, 2, 2, 2]) >>> data = np.array([1, 2, 3, 4, 5, 6]) >>> sparr = csc_matrix((data, (row, col)), shape=(3, 3)) >>> sparr.toarray() array([[1, 0, 4], [0, 0, 5], [2, 3, 6]]) >>> larr = larray(sparr) >>> larr.shape (3, 3) >>> larr.dtype dtype('int64') >>> larr.evaluate() array([[1, 0, 4], [0, 0, 5], [2, 3, 6]]) >>> larr.evaluate(empty_val=np.nan) array([[1, nan, 4], [nan, nan, 5], [2, 3, 6]]) >>> larr[2, :] array([2, 3, 6]) >>> larr.base_value <3x3 sparse matrix of type '<class 'numpy.int64'>' with 6 stored elements in Compressed Sparse Column format>
The text was updated successfully, but these errors were encountered:
Merge pull request #9 from legouee/issue1
e487513
Support creating lazy arrays from SciPy sparse matrices (see #1)
No branches or pull requests
from https://bitbucket.org/apdavison/lazyarray/issues/1/support-creating-lazy-arrays-from-scipy
Examples:
The text was updated successfully, but these errors were encountered: