0
my_list=[[123.45][34.23][123.98][67]]

The type of my_list is <class 'numpy.ndarray'> I need to add a new numpy.ndarray to the existing my_list.

new=[34.6]

Expected output:

my_list=[[123.45][34.23][123.98][67][34.6]]
Unicorn
  • 43
  • 7
  • Does this answer your question? [Concatenate a NumPy array to another NumPy array](https://stackoverflow.com/questions/9775297/concatenate-a-numpy-array-to-another-numpy-array) – tyasird Dec 08 '22 at 10:34

2 Answers2

0

please check concatenate

arr1 = np.array([1, 2, 3])
arr2 = np.array([4, 5, 6])

# Append array arr2 to array arr1
c = np.concatenate((arr1, arr2))

print(c)
tyasird
  • 926
  • 1
  • 12
  • 29
0

you can try this

np.append(my_list, new)
John Joker
  • 72
  • 6