Skip to content

Commit

Permalink
Fix numpy deprecation of np.float in issubdtype numpy/numpy#9505
Browse files Browse the repository at this point in the history
  • Loading branch information
benjello committed Jan 30, 2018
1 parent 0ab0a29 commit 2e7701d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@

# Changelog

## 0.9.4
* Numpy deprcates use of np.float with issubdtype

## 0.9.3
* Fix difference pivot_table computation
* CLarify code (use variable instead of column) and add some doctring
Expand Down
4 changes: 2 additions & 2 deletions openfisca_survey_manager/scenarios.py
Original file line number Diff line number Diff line change
Expand Up @@ -665,7 +665,7 @@ def init_simulation_with_data_frame(self, input_data_frame = None, period = None
'Converting {} from dtype {} to {}'.format(
column_name, column_serie.values.dtype, holder.variable.dtype)
)
if np.issubdtype(column_serie.values.dtype, np.float):
if np.issubdtype(column_serie.values.dtype, np.floating):
if column_serie.isnull().any():
log.debug('There are {} NaN values for {} non NaN values in variable {}'.format(
column_serie.isnull().sum(), column_serie.notnull().sum(), column_name))
Expand Down Expand Up @@ -923,7 +923,7 @@ def init_simulation_with_data_frame_by_entity(input_data_frame_by_entity = None,
'Converting {} from dtype {} to {}'.format(
column_name, column_serie.values.dtype, holder.variable.dtype)
)
if np.issubdtype(column_serie.values.dtype, np.float):
if np.issubdtype(column_serie.values.dtype, np.floating):
assert column_serie.notnull().all(), 'There are {} NaN values in variable {}'.format(
column_serie.isnull().sum(), column_name)

Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

setup(
name = 'OpenFisca-Survey-Manager',
version = '0.9.3',
version = '0.9.4',
author = 'OpenFisca Team',
author_email = '[email protected]',
classifiers = [classifier for classifier in classifiers.split('\n') if classifier],
Expand Down Expand Up @@ -52,7 +52,7 @@
install_requires = [
'configparser',
'humanize',
'numpy',
'numpy >= 1.12',
'openfisca-core >= 20.0.0, < 21.0.0 ',
'pandas >= 0.20',
'PyYAML',
Expand Down

0 comments on commit 2e7701d

Please sign in to comment.