From 21cc82bf787ee653da5c0d3a4982caaa471bd5f6 Mon Sep 17 00:00:00 2001 From: Knut-Frode Dagestad Date: Mon, 17 Aug 2026 14:58:13 +0200 Subject: [PATCH] Making sure longitudes and latitudes are floats and not strings in trajan.from_dataframe --- trajan/__init__.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/trajan/__init__.py b/trajan/__init__.py index 52859bd..ae5a7b2 100644 --- a/trajan/__init__.py +++ b/trajan/__init__.py @@ -174,6 +174,8 @@ def from_dataframe(df: pd.DataFrame, df[time] = pd.to_datetime(df[time], format='mixed') df = df.rename(columns={lat: 'lat', lon: 'lon', time: 'time'}) + df['lat'] = np.float32(df['lat']) + df['lon'] = np.float32(df['lon']) if name is not None: if name in df.columns: