Valerie Meunier

Valerie Meunier

  • NA
  • 693
  • 81.5k

why only first character in array?

Apr 9 2023 1:39 PM

Hi

this code puts only the first character in the third element of the array. How come and how to solve this?

Thanks. V.

import numpy as np
arr = np.array(["","",""])
arr[2]="abcde"
print(arr[2]) # show only 'a'
 


Answers (4)