#5 Backport fixes for numpydoc 0.9.
Merged 4 years ago by qulogic. Opened 4 years ago by qulogic.
rpms/ qulogic/python-pandas master  into  master

file added
+71
@@ -0,0 +1,71 @@ 

+ From 0ec909fca98ee5854f5865dd782d1aff99492ae6 Mon Sep 17 00:00:00 2001

+ From: Joris Van den Bossche <jorisvandenbossche@gmail.com>

+ Date: Fri, 12 Apr 2019 16:36:54 +0200

+ Subject: [PATCH] DOC: fix See Also constructs (#26059)

+ 

+ Signed-off-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>

+ ---

+  pandas/core/groupby/groupby.py | 12 ++++++++----

+  pandas/core/indexes/base.py    |  2 --

+  2 files changed, 8 insertions(+), 6 deletions(-)

+ 

+ diff --git a/pandas/core/groupby/groupby.py b/pandas/core/groupby/groupby.py

+ index 8766fdbc2..0c3eaee8c 100644

+ --- a/pandas/core/groupby/groupby.py

+ +++ b/pandas/core/groupby/groupby.py

+ @@ -1079,7 +1079,8 @@ class GroupBy(_GroupBy):

+          # defined here for API doc

+          raise NotImplementedError

+  

+ -    @Substitution(name='groupby', see_also=_common_see_also)

+ +    @Substitution(name='groupby')

+ +    @Substitution(see_also=_common_see_also)

+      def mean(self, *args, **kwargs):

+          """

+          Compute mean of groups, excluding missing values.

+ @@ -1527,7 +1528,8 @@ class GroupBy(_GroupBy):

+          return self._fill('bfill', limit=limit)

+      bfill = backfill

+  

+ -    @Substitution(name='groupby', see_also=_common_see_also)

+ +    @Substitution(name='groupby')

+ +    @Substitution(see_also=_common_see_also)

+      def nth(self, n, dropna=None):

+          """

+          Take the nth row from each group if n is an int, or a subset of rows

+ @@ -2036,7 +2038,8 @@ class GroupBy(_GroupBy):

+          shifted = fill_grp.shift(periods=periods, freq=freq)

+          return (filled / shifted) - 1

+  

+ -    @Substitution(name='groupby', see_also=_common_see_also)

+ +    @Substitution(name='groupby')

+ +    @Substitution(see_also=_common_see_also)

+      def head(self, n=5):

+          """

+          Returns first n rows of each group.

+ @@ -2064,7 +2067,8 @@ class GroupBy(_GroupBy):

+          mask = self._cumcount_array() < n

+          return self._selected_obj[mask]

+  

+ -    @Substitution(name='groupby', see_also=_common_see_also)

+ +    @Substitution(name='groupby')

+ +    @Substitution(see_also=_common_see_also)

+      def tail(self, n=5):

+          """

+          Returns last n rows of each group.

+ diff --git a/pandas/core/indexes/base.py b/pandas/core/indexes/base.py

+ index 2fa034670..4ec2e56d0 100644

+ --- a/pandas/core/indexes/base.py

+ +++ b/pandas/core/indexes/base.py

+ @@ -3623,8 +3623,6 @@ class Index(IndexOpsMixin, PandasObject):

+          --------

+          Index.array : Reference to the underlying data.

+          Index.to_numpy : A NumPy array representing the underlying data.

+ -

+ -        Return the underlying data as an ndarray.

+          """

+          return self._data.view(np.ndarray)

+  

+ -- 

+ 2.21.0

+ 

file modified
+7 -2
@@ -3,12 +3,14 @@ 

  

  Name:           python-%{srcname}

  Version:        0.24.1

- Release:        2%{?dist}

+ Release:        3%{?dist}

  Summary:        Python library providing high-performance data analysis tools

  

  License:        BSD

  URL:            http://pandas.pydata.org/

  Source0:        https://pypi.io/packages/source/p/pandas/%{srcname}-%{version}.tar.gz

+ # Fix issues with numpydoc 0.9.

+ Patch0001:      https://github.com/pandas-dev/pandas/pull/26059.patch

  

  %global __provides_exclude_from ^(%{python2_sitearch}|%{python3_sitearch})/.*\\.so$

  
@@ -49,7 +51,7 @@ 

  Python 3 version.

  

  %prep

- %autosetup -n %{srcname}-%{version}

+ %autosetup -n %{srcname}-%{version} -p1

  

  rm $(grep -rl '/\* Generated by Cython')

  
@@ -65,6 +67,9 @@ 

  %{python3_sitearch}/%{srcname}*

  

  %changelog

+ * Thu Jun 27 2019 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 0.24.1-3

+ - Fix doc build with numpydoc 0.9

+ 

  * Tue Jun 18 2019 Miro HronĨok <mhroncok@redhat.com> - 0.24.1-2

  - Subpackage python2-pandas has been removed

    See https://fedoraproject.org/wiki/Changes/Mass_Python_2_Package_Removal

This breaks downstream doc builds with numpydoc 0.9 because of invalid entries. It's not noticeable on builds for pandas though because it doesn't build docs.

rebased onto 9a61ea7

4 years ago

Pull-Request has been merged by qulogic

4 years ago