Skip to content

Commit 856a52f

Browse files
committed
fixups
1 parent e75abfe commit 856a52f

File tree

3 files changed

+4
-0
lines changed

3 files changed

+4
-0
lines changed

doc/source/user_guide/basics.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2063,6 +2063,7 @@ or a passed ``Series``), then it will be preserved in DataFrame operations. Furt
20632063
different numeric dtypes will **NOT** be combined. The following example will give you a taste.
20642064

20652065
.. ipython:: python
2066+
:okwarning:
20662067
20672068
df1 = pd.DataFrame(np.random.randn(8, 1), columns=["A"], dtype="float32")
20682069
df1

doc/source/user_guide/enhancingperf.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,7 @@ can be improved by passing an ``np.ndarray``.
171171
In [4]: %%cython
172172
...: cimport numpy as np
173173
...: import numpy as np
174+
...: np.import_array()
174175
...: cdef double f_typed(double x) except? -2:
175176
...: return x * (x - 1)
176177
...: cpdef double integrate_f_typed(double a, double b, int N):
@@ -225,6 +226,7 @@ and ``wraparound`` checks can yield more performance.
225226
...: cimport cython
226227
...: cimport numpy as np
227228
...: import numpy as np
229+
...: np.import_array()
228230
...: cdef np.float64_t f_typed(np.float64_t x) except? -2:
229231
...: return x * (x - 1)
230232
...: cpdef np.float64_t integrate_f_typed(np.float64_t a, np.float64_t b, np.int64_t N):

doc/source/whatsnew/v0.11.0.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ Dtypes
7373
Numeric dtypes will propagate and can coexist in DataFrames. If a dtype is passed (either directly via the ``dtype`` keyword, a passed ``ndarray``, or a passed ``Series``, then it will be preserved in DataFrame operations. Furthermore, different numeric dtypes will **NOT** be combined. The following example will give you a taste.
7474

7575
.. ipython:: python
76+
:okwarning:
7677
7778
df1 = pd.DataFrame(np.random.randn(8, 1), columns=['A'], dtype='float32')
7879
df1

0 commit comments

Comments
 (0)