If you remove the string, then all the elements become a floating-point number, and with the string, the elements change into a string. But the lesson mentioned that arrays can be of any type. But Numpy makes sure that everything is of the same type. In general, aren’t arrays supposed to be of the same type ?? And I’m also confused between a list and an array.
Array = Contiguous memory
List = objects scattered in memory, each object has the address of the next object
There are advantages/disadvantages to each - but that gets into computer science.
Realise that there is a difference between numpy and python. Numpy is a library and meant to behave that way - doesn’t mean that it is the golden rule or convention. Some libraries/languages will require arrays all be of one type, others not so much.