Access over 20 million homework & study documents

Answer 1 4

Content type
User Generated
Subject
Python
Type
Homework
Rating
Showing Page:
1/1
# -*- coding: utf-8 -*-
"""Assignment.ipynb
Automatically generated by Colaboratory.
Original file is located at
https://colab.research.google.com/drive/1ou0d7JPxxY6NOahwWA1F5Ikaibqkbm_J
"""
#Task 1
from scipy.sparse import lil_matrix
from scipy.sparse import csr_matrix
A = lil_matrix((1000, 1000)).toarray()
S = csr_matrix(A)
B = S.todense()
print(B)
""" Task 3
Array is form of data structure.An array is a fundamental data structure available in
python.which easy to plot and easy to save in memory.
"""
#Task 2 Task 4
from scipy.sparse import lil_matrix
A = lil_matrix((1000, 1000)).toarray()
A
#Task 5
import matplotlib.pyplot as plt
import numpy as np
A[20, :] = 0.
A[:, 999] = 0.
plt.spy(A)

Sign up to view the full document!

lock_open Sign Up
Unformatted Attachment Preview
# -*- coding: utf-8 -*"""Assignment.ipynb Automatically generated by Colaboratory. Original file is located at https://colab.research.google.com/drive/1ou0d7JPxxY6NOahwWA1F5Ikaibqkbm_J """ #Task 1 from scipy.sparse import lil_matrix from scipy.sparse import csr_matrix A = lil_matrix((1000, 1000)).to ...
Purchase document to see full attachment
User generated content is uploaded by users for the purposes of learning and should be used following Studypool's honor code & terms of service.

Anonymous
I use Studypool every time I need help studying, and it never disappoints.

Studypool
4.7
Trustpilot
4.5
Sitejabber
4.4