Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unify casing of NumPy #1169

Merged
merged 2 commits into from
Dec 7, 2022
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
18 changes: 12 additions & 6 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

### 37.0.1 [#1169](https://github.com/openfisca/openfisca-core/pull/1169)

#### Technical changes

- Unify casing of NumPy.

# 37.0.0 [#1142](https://github.com/openfisca/openfisca-core/pull/1142)

#### Deprecations
Expand Down Expand Up @@ -432,12 +438,12 @@ _Note: this version has been unpublished due to an issue introduced by NumPy upg

#### Breaking changes

- Update Numpy version's upper bound to 1.18
- Numpy 1.18 [expires a list of old deprecations](https://numpy.org/devdocs/release/1.18.0-notes.html#expired-deprecations) that might be used in openfisca country models.
- Update NumPy version's upper bound to 1.18
- NumPy 1.18 [expires a list of old deprecations](https://numpy.org/devdocs/release/1.18.0-notes.html#expired-deprecations) that might be used in openfisca country models.

#### Migration details

You might need to change your code if any of the [Numpy expired deprecations](https://numpy.org/devdocs/release/1.18.0-notes.html#expired-deprecations) is used in your model formulas.
You might need to change your code if any of the [NumPy expired deprecations](https://numpy.org/devdocs/release/1.18.0-notes.html#expired-deprecations) is used in your model formulas.

Here is a subset of the deprecations that you might find in your model with some checks and migration steps (where `np` stands for `numpy`):

Expand Down Expand Up @@ -595,7 +601,7 @@ _Note: this version has been unpublished due to an issue introduced by dpath upg

- Downgrade numpy version's upper bound to 1.17
- Details:
- Numpy 1.18 deprecates the use of several of its methods.
- NumPy 1.18 deprecates the use of several of its methods.
- Changes in `numpy.select` have impacted other packages depending on OpenFisca Core.

## 34.6.0 [#920](https://github.com/openfisca/openfisca-core/pull/920)
Expand Down Expand Up @@ -820,7 +826,7 @@ _Note: this version has been unpublished due to an issue introduced by 34.2.9 in

#### Technical changes

- Update dependencies: Numpy, Flask, dpath, numexpr
- Update dependencies: NumPy, Flask, dpath, numexpr

## 34.2.0 [#872](https://github.com/openfisca/openfisca-core/pull/872)

Expand Down Expand Up @@ -1653,7 +1659,7 @@ Country package maintainers who still want to provide the Web API by default wit
_Note: this version has been unpublished due to an issue introduced by 23.4.0 in the Web API. Please use 23.5.2 or a more recent version._

- Remove the irrelevant decimals that were added at the end of `float` results in the Web API and the test runner.
- These decimals were added while converting a Numpy `float32` to a regular 64-bits Python `float`.
- These decimals were added while converting a NumPy `float32` to a regular 64-bits Python `float`.

For instance, the former Web API response extract:

Expand Down
4 changes: 2 additions & 2 deletions openfisca_core/commons/tests/test_formulas.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def test_apply_thresholds_when_too_many_choices():


def test_concat_when_this_is_array_not_str():
"""Casts ``this`` to ``str`` when it is a numpy array other than string."""
"""Casts ``this`` to ``str`` when it is a NumPy array other than string."""

this = numpy.array([1, 2])
that = numpy.array(["la", "o"])
Expand All @@ -51,7 +51,7 @@ def test_concat_when_this_is_array_not_str():


def test_concat_when_that_is_array_not_str():
"""Casts ``that`` to ``str`` when it is a numpy array other than string."""
"""Casts ``that`` to ``str`` when it is a NumPy array other than string."""

this = numpy.array(["ho", "cha"])
that = numpy.array([1, 2])
Expand Down
2 changes: 1 addition & 1 deletion openfisca_core/indexed_enums/enum_array.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

class EnumArray(numpy.ndarray):
"""
Numpy array subclass representing an array of enum items.
NumPy array subclass representing an array of enum items.

EnumArrays are encoded as ``int`` arrays to improve performance
"""
Expand Down
2 changes: 1 addition & 1 deletion openfisca_core/variables/variable.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ class Variable:

.. attribute:: dtype

Numpy `dtype <https://docs.scipy.org/doc/numpy-1.13.0/reference/generated/numpy.dtype.html>`_ used under the hood for the variable.
NumPy `dtype <https://docs.scipy.org/doc/numpy-1.13.0/reference/generated/numpy.dtype.html>`_ used under the hood for the variable.

.. attribute:: end

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@

setup(
name = 'OpenFisca-Core',
version = '37.0.0',
version = '37.0.1',
author = 'OpenFisca Team',
author_email = 'contact@openfisca.org',
classifiers = [
Expand Down