Skip to content

0.23.4 backports 1 #22178

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

Merged
merged 4 commits into from
Aug 3, 2018
Merged
Show file tree
Hide file tree
Changes from 3 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
2 changes: 2 additions & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,14 @@ environment:
matrix:

- CONDA_ROOT: "C:\\Miniconda3_64"
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
PYTHON_VERSION: "3.6"
PYTHON_ARCH: "64"
CONDA_PY: "36"
CONDA_NPY: "113"

- CONDA_ROOT: "C:\\Miniconda3_64"
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
PYTHON_VERSION: "2.7"
PYTHON_ARCH: "64"
CONDA_PY: "27"
Expand Down
5 changes: 5 additions & 0 deletions doc/source/whatsnew/v0.23.1.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ v0.23.1
This is a minor bug-fix release in the 0.23.x series and includes some small regression fixes
and bug fixes. We recommend that all users upgrade to this version.

.. warning::

Starting January 1, 2019, pandas feature releases will support Python 3 only.
See :ref:`install.dropping-27` for more.

.. contents:: What's new in v0.23.1
:local:
:backlinks: none
Expand Down
4 changes: 4 additions & 0 deletions doc/source/whatsnew/v0.23.2.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ and bug fixes. We recommend that all users upgrade to this version.
Pandas 0.23.2 is first pandas release that's compatible with
Python 3.7 (:issue:`20552`)

.. warning::

Starting January 1, 2019, pandas feature releases will support Python 3 only.
See :ref:`install.dropping-27` for more.

.. contents:: What's new in v0.23.2
:local:
Expand Down
42 changes: 7 additions & 35 deletions doc/source/whatsnew/v0.23.4.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
.. _whatsnew_0234:

v0.23.4
-------
v0.23.4 (August 3, 2018)
------------------------

This is a minor bug-fix release in the 0.23.x series and includes some small regression fixes
and bug fixes. We recommend that all users upgrade to this version.

.. warning::

Starting January 1, 2019, pandas feature releases will support Python 3 only.
See :ref:`install.dropping-27` for more.

.. contents:: What's new in v0.23.4
:local:
Expand All @@ -16,8 +20,7 @@ and bug fixes. We recommend that all users upgrade to this version.
Fixed Regressions
~~~~~~~~~~~~~~~~~

-
-
- Python 3.7 with Windows gave all missing values for rolling variance calculations (:issue:`21813`)

.. _whatsnew_0234.bug_fixes:

Expand All @@ -28,37 +31,6 @@ Bug Fixes

- Bug where calling :func:`DataFrameGroupBy.agg` with a list of functions including ``ohlc`` as the non-initial element would raise a ``ValueError`` (:issue:`21716`)
- Bug in ``roll_quantile`` caused a memory leak when calling ``.rolling(...).quantile(q)`` with ``q`` in (0,1) (:issue:`21965`)
-

**Conversion**

-
-

**Indexing**

-
-

**I/O**

-
-

**Categorical**

-
-

**Timezones**

-
-

**Timedelta**

-
-

**Missing**

Expand Down
1 change: 1 addition & 0 deletions pandas/_libs/src/headers/cmath
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#if defined(_MSC_VER) && (_MSC_VER < 1800)
#include <cmath>
namespace std {
__inline int isnan(double x) { return _isnan(x); }
__inline int signbit(double num) { return _copysign(1.0, num) < 0; }
}
#else
Expand Down
21 changes: 11 additions & 10 deletions pandas/_libs/window.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ cnp.import_array()


cdef extern from "../src/headers/cmath" namespace "std":
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@chris-b1 @jbrockmendel this changed between 0.23.x and master. On master we use

cdef extern from "src/headers/cmath" namespace "std":

But here we use ../src/headers/cmath. Does this look correct for 0.23.x?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like something I would have nit-picked about. The "../" is inaccurate in this context. Evidently the cython/gcc compiler doesn't mind either way, but I'm pretty sure the one in master is More Correct.

bint isnan(double) nogil
int signbit(double) nogil
double sqrt(double x) nogil

Expand Down Expand Up @@ -654,16 +655,16 @@ cdef inline void add_var(double val, double *nobs, double *mean_x,
double *ssqdm_x) nogil:
""" add a value from the var calc """
cdef double delta

# Not NaN
if val == val:
nobs[0] = nobs[0] + 1

# a part of Welford's method for the online variance-calculation
# https://en.wikipedia.org/wiki/Algorithms_for_calculating_variance
delta = val - mean_x[0]
mean_x[0] = mean_x[0] + delta / nobs[0]
ssqdm_x[0] = ssqdm_x[0] + ((nobs[0] - 1) * delta ** 2) / nobs[0]
# `isnan` instead of equality as fix for GH-21813, msvc 2017 bug
if isnan(val):
return

nobs[0] = nobs[0] + 1
# a part of Welford's method for the online variance-calculation
# https://en.wikipedia.org/wiki/Algorithms_for_calculating_variance
delta = val - mean_x[0]
mean_x[0] = mean_x[0] + delta / nobs[0]
ssqdm_x[0] = ssqdm_x[0] + ((nobs[0] - 1) * delta ** 2) / nobs[0]


cdef inline void remove_var(double val, double *nobs, double *mean_x,
Expand Down