Skip to content

Commit

Permalink
Fix NumPy integer/floating checks on Perspective (#4366)
Browse files Browse the repository at this point in the history
  • Loading branch information
philippjfr committed Jan 30, 2023
1 parent e459067 commit 8fe226f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ This release introduces a large number of bug fixes and minor enhancements. Due
- Upgrade plotly.js to 2.10.1 ([#4320](https://github.com/holoviz/panel/pull/4320))
- Upgrade to pyodide 0.22.1 in `panel convert` ([#4334](https://github.com/holoviz/panel/pull/4334))
- Upgrade to pyscript 2022.12.01 in `panel convert` ([#4334](https://github.com/holoviz/panel/pull/4334))
- Fix compatibility of Perspective pane with Numpy 1.24 ([#4362](https://github.com/holoviz/panel/issues/4362))

### Deprecations

Expand Down
1 change: 1 addition & 0 deletions doc/about/releases.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ This release introduces a large number of bug fixes and minor enhancements. Due
- Upgrade plotly.js to 2.10.1 ([#4320](https://github.com/holoviz/panel/pull/4320))
- Upgrade to pyodide 0.22.1 in `panel convert` ([#4334](https://github.com/holoviz/panel/pull/4334))
- Upgrade to pyscript 2022.12.01 in `panel convert` ([#4334](https://github.com/holoviz/panel/pull/4334))
- Fix compatibility of Perspective pane with Numpy 1.24 ([#4362](https://github.com/holoviz/panel/issues/4362))

### Deprecations

Expand Down
6 changes: 3 additions & 3 deletions panel/pane/perspective.py
Original file line number Diff line number Diff line change
Expand Up @@ -424,10 +424,10 @@ def _init_params(self):
schema[col] = 'datetime'
elif isinstance(value, str):
schema[col] = 'string'
elif isinstance(value, (float, np.float)):
schema[col] = 'float'
elif isinstance(value, (int, np.int)):
elif isinstance(value, (float, np.floating)):
schema[col] = 'float'
elif isinstance(value, (int, np.integer)):
schema[col] = 'integer'
else:
schema[col] = 'string'
else:
Expand Down

0 comments on commit 8fe226f

Please sign in to comment.