Skip to content

Commit

Permalink
Fix chararray __array_finalize__
Browse files Browse the repository at this point in the history
  • Loading branch information
lysnikolaou committed Mar 20, 2024
1 parent f0d1bc6 commit 481a013
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion numpy/_core/defchararray.py
Expand Up @@ -572,7 +572,7 @@ def __array_wrap__(self, arr, context=None, return_scalar=False):

def __array_finalize__(self, obj):
# The b is a special case because it is used for reconstructing.
if self.dtype.char not in 'SUbc':
if self.dtype.char not in 'VSUbc':
raise ValueError("Can only create a chararray from string data.")

def __getitem__(self, obj):
Expand Down

0 comments on commit 481a013

Please sign in to comment.