I would like to create an array of two columns such that the second column is generated from the first in an array.
This is the best I can do ... it simply stacks x and y, one on top of itself.
import numpy as np
from numpy import array
n= 100
results= np.array([])
for x in range(0, 100):
y= x*x
new_row = [x, y]
results = np.append(results, new_row)
I got this one to work... eventually!!!!
import numpy as np
from numpy import array
results= np.zeros(shape=(0,2))
for x in range(0, 100):
y = x*x
row = array([[x, y]])
results = np.concatenate((results, row))
b = np.column_stack((a, func(a)))