Skip to content

Commit

Permalink
Fixed dtype issue with filter() function
Browse files Browse the repository at this point in the history
  • Loading branch information
hover2pi committed May 24, 2017
1 parent 2de49c4 commit be09d50
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Binary file modified svo_filters/data/filter_list.p
Binary file not shown.
7 changes: 5 additions & 2 deletions svo_filters/svo.py
Original file line number Diff line number Diff line change
Expand Up @@ -452,9 +452,12 @@ def filters(filter_directory=pkg_resources.resource_filename('svo_filters', \
filt = Filter(band, **kwargs)
filt.Band = band

# Put metadata into table
# Put metadata into table with correct dtypes
info = filt.info(True)
table = at.Table(info['Values'], names=info['Attributes'])
vals = [float(i) if i.replace('.','').replace('-','')\
.replace('+','').isnumeric() else i for i in info['Values']]
dtypes = np.array([type(i) for i in vals])
table = at.Table(np.array([vals]), names=info['Attributes'], dtype=dtypes)

tables.append(table)

Expand Down

0 comments on commit be09d50

Please sign in to comment.