Skip to content

Commit ff12ea0

Browse files
Fixing assert statement in tutorial_quickstart
1 parent 7551160 commit ff12ea0

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

docs/getting_started/tutorial_quickstart.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -212,8 +212,8 @@ When we check the output, we can see that the particles have returned to their o
212212
df_back = parcels.read_particlefile("output-backwards.parquet")
213213
214214
scatter = plt.scatter(df_back['lon'], df_back['lat'], c=df_back['time'])
215-
particles_at_start = df_back.filter(pl.col("time") == df_back["time"].max())
216-
plt.scatter(particles_at_start['lon'], particles_at_start['lat'], facecolors="none", edgecolors='r') # starting positions
215+
particles_at_max_time = df_back.filter(pl.col("time") == df_back["time"].max())
216+
plt.scatter(particles_at_max_time['lon'], particles_at_max_time['lat'], facecolors="none", edgecolors='r') # starting positions
217217
plt.xlabel("Longitude [deg E]")
218218
plt.xlim(31,33)
219219
plt.ylabel("Latitude [deg N]")
@@ -226,6 +226,7 @@ Using Euler forward advection, the final positions are equal to the original pos
226226

227227
```{code-cell}
228228
# testing that final location == original location
229-
np.testing.assert_almost_equal(particles_at_start["lat"], lat, 2)
230-
np.testing.assert_almost_equal(particles_at_start['lon'], lon, 2)
229+
particles_at_min_time = df_back.filter(pl.col("time") == df_back["time"].min())
230+
np.testing.assert_almost_equal(particles_at_min_time["lat"], lat, 2)
231+
np.testing.assert_almost_equal(particles_at_min_time['lon'], lon, 2)
231232
```

0 commit comments

Comments
 (0)