Skip to content

Commit

Permalink
Merge pull request #55 from SuperDARN/fix/npstr-dep
Browse files Browse the repository at this point in the history
FIX: Change np.str to str
  • Loading branch information
carleyjmartin authored Jan 30, 2023
2 parents 37ee7d9 + 2939858 commit 58ffa43
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 2 additions & 2 deletions pydarnio/borealis/base_format.py
Original file line number Diff line number Diff line change
Expand Up @@ -979,7 +979,7 @@ def single_string_fields(cls):
All the single element string fields in records of the
format, as a list.
"""
return [k for k, v in cls.single_element_types().items() if v == np.str_]
return [k for k, v in cls.single_element_types().items() if issubclass(v, str)]

@classmethod
def array_string_fields(cls):
Expand All @@ -993,7 +993,7 @@ def array_string_fields(cls):
All the fields with arrays of strings in records of the
format, as a list.
"""
return [k for k, v in cls.array_dtypes().items() if v == np.str_]
return [k for k, v in cls.array_dtypes().items() if issubclass(v, str)]

@classmethod
def bool_types(cls):
Expand Down
2 changes: 0 additions & 2 deletions pydarnio/utils/conversions.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,6 @@
np.float32: 'f',
np.float64: 'd',
str: 's',
np.str_: 's',
np.str: 's',
np.int64: 'q',
np.uint8: 'B',
np.uint16: 'H',
Expand Down

0 comments on commit 58ffa43

Please sign in to comment.