## Search found 4 matches

- Tue Jun 23, 2020 2:11 pm
- Forum: Deep Learning Prerequisites: The Numpy Stack in Python
- Topic: Matplotlib exercise
- Replies:
**9** - Views:
**2686**

### Re: Matplotlib exercise

Glad it worked out for you too!

- Wed Jun 17, 2020 12:57 pm
- Forum: Deep Learning Prerequisites: The Numpy Stack in Python
- Topic: Matplotlib exercise
- Replies:
**9** - Views:
**2686**

### Re: Matplotlib exercise

The way I did it is just spread a uniformly-distributed set of points between -1 and 1, then assign them colors depending on their position. # Import required libraries import numpy as np import matplotlib.pyplot as plt # Make 1D arrays for x and y axes and spread them around -1 and 1 x1 = (np.rando...

- Sat Jun 06, 2020 3:33 pm
- Forum: Deep Learning Prerequisites: The Numpy Stack in Python
- Topic: How did you guys complete the matplotlib exercise
- Replies:
**3** - Views:
**2079**

### Re: How did you guys complete the matplotlib exercise

Here's my solution: # Import required libraries import numpy as np import matplotlib.pyplot as plt # Make 1D arrays for x and y axes and spread them around -1 and 1 x1 = (np.random.random(2000)-0.5)*2 x2 = (np.random.random(2000)-0.5)*2 # Make an array for color picking Y = np.zeros(2000) for e in r...

- Sat Jun 06, 2020 3:28 pm
- Forum: Deep Learning Prerequisites: The Numpy Stack in Python
- Topic: Pandas Exercise
- Replies:
**4** - Views:
**3321**

### Re: Pandas Exercise

Here's what I have so far: import numpy as np import matplotlib.pyplot as plt import pandas as pd x1 = (np.random.random(2000)-0.5)*30 x2 = (np.random.random(2000)-0.5)*30 A = np.column_stack((x1,x2)) df = pd.DataFrame(A, columns=['x1','x2']) def pwr2(e): return e*e def mult(e,f): return e*f df['x1^...