Skip to content

Commit

Permalink
Merge pull request #56 from pllim/np-issubdtype
Browse files Browse the repository at this point in the history
MNT: Remove deprecation warning from np.issubdtype
  • Loading branch information
pllim committed Jul 18, 2018
1 parent ef09f07 commit 9229bd3
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 11 deletions.
5 changes: 3 additions & 2 deletions .travis.yml
Expand Up @@ -58,7 +58,7 @@ matrix:

# Do a test in older Python 3.
- python: 3.5
env: SETUP_CMD='test --open-files'
env: SETUP_CMD='test --open-files' SYNPHOT_VERSION=stable

# TODO: Use Astropy lts after 3.0 is out.
# Do a test in Python 2.
Expand Down Expand Up @@ -110,7 +110,8 @@ install:
# other dependencies.

# SYNPHOT
- if [[ $SYNPHOT_VERSION == development ]]; then pip -q install git+http://github.com/spacetelescope/synphot_refactor.git#egg=synphot_refactor; fi
- if [[ $SYNPHOT_VERSION == development ]]; then pip -q install git+http://github.com/spacetelescope/synphot_refactor.git#egg=synphot; fi
- if [[ $SYNPHOT_VERSION == stable ]]; then pip -q install synphot; fi

script:
# Only needed for remote data.
Expand Down
5 changes: 3 additions & 2 deletions appveyor.yml
Expand Up @@ -20,7 +20,6 @@ environment:

# We test Python 2.7 and 3.6

# TODO: Use Astropy lts after 3.0 is out.
- PYTHON_VERSION: "2.7"
ASTROPY_VERSION: "stable"
NUMPY_VERSION: "stable"
Expand All @@ -42,7 +41,9 @@ install:
#- "python -m pip install --upgrade pip"

# SYNPHOT (DEV)
- "pip -q install git+http://github.com/spacetelescope/synphot_refactor.git#egg=synphot_refactor"
#- "pip -q install git+http://github.com/spacetelescope/synphot_refactor.git#egg=synphot"
# SYNPHOT (STABLE)
- "pip -q install synphot"

# Not a .NET project, we build the package in the install step instead
build: false
Expand Down
2 changes: 1 addition & 1 deletion docs/rtd-pip-requirements
Expand Up @@ -3,4 +3,4 @@ scipy>=0.18
matplotlib
astropy-helpers
astropy
-e git+https://github.com/spacetelescope/synphot_refactor.git#egg=synphot
synphot
1 change: 1 addition & 0 deletions stsynphot/conftest.py
Expand Up @@ -29,6 +29,7 @@
try:
PYTEST_HEADER_MODULES['Astropy'] = 'astropy'
PYTEST_HEADER_MODULES['scikit-image'] = 'skimage'
PYTEST_HEADER_MODULES['synphot'] = 'synphot'
del PYTEST_HEADER_MODULES['h5py']
except (NameError, KeyError): # NameError is needed to support Astropy < 1.0
pass
Expand Down
12 changes: 6 additions & 6 deletions stsynphot/stio.py
Expand Up @@ -300,8 +300,8 @@ def read_graphtable(filename, tab_ext=1):
"""
graph_dtypes = {
'COMPNAME': np.str, 'KEYWORD': np.str, 'INNODE': np.int,
'OUTNODE': np.int, 'THCOMPNAME': np.str, 'COMMENT': np.str}
'COMPNAME': np.str_, 'KEYWORD': np.str_, 'INNODE': np.int32,
'OUTNODE': np.int32, 'THCOMPNAME': np.str_, 'COMMENT': np.str_}
data = _read_table(filename, tab_ext, graph_dtypes)

# Get primary area
Expand Down Expand Up @@ -355,8 +355,8 @@ def read_comptable(filename, tab_ext=1):
"""
return _read_table(filename, tab_ext,
{'TIME': np.str, 'COMPNAME': np.str,
'FILENAME': np.str, 'COMMENT': np.str})
{'TIME': np.str_, 'COMPNAME': np.str_,
'FILENAME': np.str_, 'COMMENT': np.str_})


def read_catalog(filename, tab_ext=1):
Expand Down Expand Up @@ -395,8 +395,8 @@ def read_catalog(filename, tab_ext=1):
Data table.
"""
return _read_table(filename, tab_ext, {'INDEX': np.str,
'FILENAME': np.str})
return _read_table(filename, tab_ext, {'INDEX': np.str_,
'FILENAME': np.str_})


def read_wavecat(filename):
Expand Down

0 comments on commit 9229bd3

Please sign in to comment.