Search found 2 matches

by krb
Thu Mar 17, 2022 9:29 pm
Forum: Deep Learning Prerequisites: The Numpy Stack in Python
Topic: Matplotlib exercise
Replies: 19
Views: 14003

Re: Matplotlib exercise

Here's my approach! import numpy as np import matplotlib.pyplot as plt zerotoone = np.random.uniform(0, 1,size=(1000)) zerotoone2 = np.random.uniform(0, 1,size=(1000)) minusonetozero = np.random.uniform(-1, 0,size=(1000)) minusonetozero2 = np.random.uniform(-1, 0,size=(1000)) plt.scatter(zerotoone, ...
by krb
Thu Mar 17, 2022 6:30 pm
Forum: Deep Learning Prerequisites: The Numpy Stack in Python
Topic: Numpy exercise
Replies: 6
Views: 3967

Re: Numpy exercise

Here's another approach that seems to work. Let me know what you think! import numpy as np from datetime import datetime a = np.random.random((10000000)) b = np.random.random((10000000)) t0fast = datetime.now() fast = a.dot(b) print(fast) t1fast = datetime.now() - t0fast print("Fast method: &qu...

Go to advanced search