Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion fermipy/catalog.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ def strip_columns(tab):
"""Strip whitespace from string columns."""
for colname in tab.colnames:
if tab[colname].dtype.kind in ['S', 'U']:
tab[colname] = np.core.defchararray.strip(tab[colname])
tab[colname] = np.char.strip(tab[colname])


def row_to_dict(row):
Expand Down
4 changes: 1 addition & 3 deletions fermipy/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
from scipy.optimize import brentq
from scipy.ndimage import label
import scipy.special as special
from numpy.core import defchararray
from numpy.polynomial.polynomial import polyfit
try:
from astropy.extern import six
Expand Down Expand Up @@ -239,8 +238,7 @@ def find_rows_by_string(tab, names, colnames=['assoc']):
continue

col = tab[[colname]].copy()
col[colname] = defchararray.replace(defchararray.lower(col[colname]).astype(str),
' ', '')
col[colname] = np.char.replace(np.char.lower(col[colname]).astype(str),' ', '')
for name in names:
mask |= col[colname] == name
return mask
Expand Down
Loading