sakshamv30 / GetSetFOSS_ML

This repository is dedicated to the introduction to the python libraries used for machine learning and scientific computing.
3 stars 15 forks source link

Solution for some basic array things #21

Closed arhum602 closed 4 years ago

sa4k5hi commented 4 years ago

Write the code snippet instead of writing the answer in comments for finding the datatype of the array @arhum602

arhum602 commented 4 years ago

Updated @sakshamv30

sa4k5hi commented 4 years ago

That is wrong way to find the datatype. It gives the following error: TypeError: data type not understood

First you need to convert that list into a numpy array and then find its datatype. Also there is a difference between dimension and shape, np.shape(numbers_) returns the no. of rows x no. of columns, in case of 2d-list which is not same as dimension.