Skip to content

Commit

Permalink
Don't fail on bool dtype
Browse files Browse the repository at this point in the history
  • Loading branch information
xl0 committed Feb 6, 2024
1 parent 3e79716 commit 61f2cea
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lovely_numpy/repr_str.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
}

def short_dtype(x: Union[np.ndarray, np.generic]):
return dtnames.get(x.dtype.name, x.dtype)
return dtnames.get(x.dtype.name, str(x.dtype))

# %% ../nbs/00_repr_str.ipynb 9
def plain_repr(x):
Expand Down
2 changes: 1 addition & 1 deletion nbs/00_repr_str.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
" }\n",
"\n",
"def short_dtype(x: Union[np.ndarray, np.generic]):\n",
" return dtnames.get(x.dtype.name, x.dtype)"
" return dtnames.get(x.dtype.name, str(x.dtype))"
]
},
{
Expand Down
4 changes: 2 additions & 2 deletions settings.ini
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ conda_maintainers = xl0 sugatoray
conda_description = %(description)s

### Optional ###
requirements = numpy>=1.17 pillow fastcore ipython
requirements = numpy>=1.17 fastcore ipython
pip_requirements = matplotlib
conda_requirements = matplotlib-base
dev_requirements = scipy
# console_scripts =
# console_scripts =

0 comments on commit 61f2cea

Please sign in to comment.