Closed mdancho84 closed 1 year ago
np.float16 when applied to inside the tk.reduce_memory_usage() function has odd precision effects.
np.float16
tk.reduce_memory_usage()
import pandas as pd import pytimetk as tk import numpy as np data = {'Group': ['A', 'A', 'B', 'B', 'C', 'C'], 'Value': [10.8, 15.2, 10.3, 13.9, 5.2, 7.1]} df = pd.DataFrame(data) df_result = tk.reduce_memory_usage(df) df.glimpse() df_result.glimpse()
We can see that the np.float16 is modifying the decimal point on each of the numeric data.
I've changed the minimum float to float32
Problem:
np.float16
when applied to inside thetk.reduce_memory_usage()
function has odd precision effects.Example:
We can see that the
np.float16
is modifying the decimal point on each of the numeric data.