Войти
  • 7653Просмотров
  • 3 недели назадОпубликованоBro Code

Learn NumPy data types in 8 minutes! 💱

#python #coding #numpy # dtype = Keyword argument that tells NumPy what kind of values are stored in an array # Otherwise NumPy guesses the best data type based on your data # Manually setting dtype improves performance # & is more memory efficient (especially when working with large data sets) # integer (int8, int16, int32, int64) # float (float16, float32, float64) # boolean (bool_) # string (str_) # object (object_) # int8 = -128 to 127 # int16 = –32,768 to 32,767 # int32 = –2,147,483,648 to 2,147,483,647 # int64 = – to # float16 = ~3-4 decimal digit precision # float32 = ~7-8 decimal digit precision # float64 = ~15-17 decimal digit precision