## Search found 5 matches

Tue Apr 06, 2021 7:48 am
Forum: Deep Learning Prerequisites: The Numpy Stack in Python
Topic: Pandas Exercise
Replies: 10
Views: 11333

### Re: Pandas Exercise

I persevered, sensei! :D Donut is a little thin near the x axis, but still delicious :lol: radius = 5 points = 200 # repeating sequence to store negative y values x = np.repeat(np.linspace(-radius,radius,num=points),2) y = np.zeros(400) # generating y array with positive and negative sqrt values for...
Mon Apr 05, 2021 5:09 pm
Forum: Deep Learning Prerequisites: The Numpy Stack in Python
Topic: Pandas Exercise
Replies: 10
Views: 11333

### Re: Pandas Exercise

Hello, I was able to generate the donut scatter plot by converting polar array to cartesian array, but when I tried to generate a simple circle using the equation of circle i.e. x^2 + y^2 = r^2 (centered circle), I was not able to do that. Basically, when I use y = np.sqrt(r**2 - x**2), where x is a...
Sun Apr 04, 2021 7:50 pm
Forum: Deep Learning Prerequisites: The Numpy Stack in Python
Topic: Matplotlib exercise
Replies: 19
Views: 14003

### Re: Matplotlib exercise

Found a really easy 4 lines of code solution to this problem. import numpy as np import matplotlib.pyplot as plt #Generate random 2D array with 2000 elements and dimensionality of 2 and values between -1 to 1 x = np.random.uniform(-1, 1, size=(2000,2)) #Generate a new 2D array of just 0's and 1's u...
Sun Apr 04, 2021 4:39 pm
Forum: Deep Learning Prerequisites: The Numpy Stack in Python
Topic: Matplotlib exercise
Replies: 19
Views: 14003

### Re: Matplotlib exercise

Similar to Efortier's method, but number of datapoints can be changed. # DLP - Matplotlib - Exercise # Generate an plot the XOR datasheet import numpy as np import matplotlib.pyplot as plt datapoints = 1500 x = np.random.rand(datapoints,2)*2 - 1 # generating and shifting numbers l = np.zeros(datapoi...
Sat Apr 03, 2021 1:07 pm
Forum: Deep Learning Prerequisites: The Numpy Stack in Python
Topic: Numpy exercise
Replies: 6
Views: 3959

### Re: Numpy exercise

Hello, there seems to be some logical problem with your code, the exercise is about comparing matrix multiplication using lists and numpy dot operator. Your code seems to be multiplying randomly generated 1D arrays, using for loop then the dot operator. I wasn't able to generate random lists, so I u...