This is an automated email from the ASF dual-hosted git repository.

kou pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/arrow.git


The following commit(s) were added to refs/heads/master by this push:
     new 61598c3  ARROW-9576: [Python][Doc] Fix error in example code for 
extension types
61598c3 is described below

commit 61598c34b2cbad11e4c3a9fe1b33168c98d9d51b
Author: Bryan Cutler <[email protected]>
AuthorDate: Tue Jul 28 09:32:19 2020 +0900

    ARROW-9576: [Python][Doc] Fix error in example code for extension types
    
    This fixes an error in the documentation example code for pyarrow extension 
types.
    
    Closes #7845 from BryanCutler/doc-fix-extension-example-code-ARROW-9576
    
    Authored-by: Bryan Cutler <[email protected]>
    Signed-off-by: Sutou Kouhei <[email protected]>
---
 docs/source/python/extending_types.rst | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/docs/source/python/extending_types.rst 
b/docs/source/python/extending_types.rst
index e07acfc..6613dec 100644
--- a/docs/source/python/extending_types.rst
+++ b/docs/source/python/extending_types.rst
@@ -167,7 +167,7 @@ more flexible, parametrized extension types are also 
possible.
 
 The example given here implements an extension type for the `pandas "period"
 data type 
<https://pandas.pydata.org/pandas-docs/stable/user_guide/timeseries.html#time-span-representation>`__,
-represententing time spans (e.g., a frequency of a day, a month, a quarter, 
etc).
+representing time spans (e.g., a frequency of a day, a month, a quarter, etc).
 It is stored as an int64 array which is interpreted as the number of time spans
 of the given frequency since 1970.
 
@@ -241,7 +241,7 @@ the data as a 2-D Numpy array ``(N, 3)`` without any copy::
 
     class Point3DArray(pa.ExtensionArray):
         def to_numpy_array(self):
-            return arr.storage.flatten().to_numpy().reshape((-1, 3))
+            return self.storage.flatten().to_numpy().reshape((-1, 3))
 
 
     class Point3DType(pa.PyExtensionType):

Reply via email to