Skip to content

Commit

Permalink
update chararray
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinsantana11 committed Jan 9, 2025
1 parent d416fe6 commit 1040fe0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions clouddrift/adapters/gdp/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ def str_to_float(value: str, default: float = np.nan) -> float:
return default


def cut_str(value: str, max_length: int) -> np.chararray:
def cut_str(value: str, max_length: int) -> np.char.chararray:
"""Cut a string to a specific length and return it as a numpy chararray.
Parameters
Expand All @@ -284,7 +284,7 @@ def cut_str(value: str, max_length: int) -> np.chararray:
out : np.chararray
String with max_length characters
"""
charar = np.chararray(1, max_length)
charar = np.char.chararray(1, max_length)
charar[:max_length] = value
return charar

Expand Down

0 comments on commit 1040fe0

Please sign in to comment.