Skip to content

Commit 2218e8f

Browse files
Update parcels/fieldset.py
Co-authored-by: Nick Hodgskin <36369090+VeckoTheGecko@users.noreply.github.com>
1 parent 568f133 commit 2218e8f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

parcels/fieldset.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ def add_constant(self, name, value):
164164
"""
165165
if name in self.constants:
166166
raise ValueError(f"FieldSet already has a constant with name '{name}'")
167-
if not isinstance(value, (float, np.float32, int, np.int32)):
167+
if not isinstance(value, (float, np.floating, int, np.integer)):
168168
raise ValueError(f"FieldSet constants have to be of type float or int, got a {type(value)}")
169169
self.constants[name] = np.float32(value)
170170

0 commit comments

Comments
 (0)