File tree 2 files changed +21
-7
lines changed
2 files changed +21
-7
lines changed Original file line number Diff line number Diff line change 1
1
#include "Python.h"
2
2
#include "numpy/ndarrayobject.h"
3
3
4
- inline int
4
+ #ifndef PANDAS_INLINE
5
+ #if defined(__GNUC__ )
6
+ #define PANDAS_INLINE __inline__
7
+ #elif defined(_MSC_VER )
8
+ #define PANDAS_INLINE __inline
9
+ #elif defined (__STDC_VERSION__ ) && __STDC_VERSION__ >= 199901L
10
+ #define PANDAS_INLINE inline
11
+ #else
12
+ #define PANDAS_INLINE
13
+ #endif
14
+ #endif
15
+
16
+ PANDAS_INLINE int
5
17
is_integer_object (PyObject * obj ) {
6
18
return PyArray_IsIntegerScalar (obj );
7
19
}
8
20
9
- inline int
21
+ PANDAS_INLINE int
10
22
is_float_object (PyObject * obj ) {
11
23
return (PyFloat_Check (obj ) || PyArray_IsScalar (obj , Floating ));
12
24
}
13
25
14
- inline int
26
+ PANDAS_INLINE int
15
27
is_bool_object (PyObject * obj ) {
16
28
return (PyBool_Check (obj ) || PyArray_IsScalar (obj , Bool ));
17
29
}
18
30
19
- inline int
31
+ PANDAS_INLINE int
20
32
is_string_object (PyObject * obj ) {
21
33
return (PyString_Check (obj ) || PyUnicode_Check (obj ));
22
34
}
23
35
24
- inline int
36
+ PANDAS_INLINE int
25
37
assign_value_1d (PyArrayObject * ap , Py_ssize_t _i , PyObject * v ) {
26
- char * item ;
27
38
npy_intp i = (npy_intp ) _i ;
28
- item = PyArray_DATA (ap ) + i * PyArray_STRIDE (ap , 0 );
39
+ char * item = ( char * ) PyArray_DATA (ap ) + i * PyArray_STRIDE (ap , 0 );
29
40
return PyArray_DESCR (ap )-> f -> setitem (v , item , ap );
30
41
}
Original file line number Diff line number Diff line change @@ -2038,6 +2038,9 @@ def test_append_series(self):
2038
2038
ignore_index = True )
2039
2039
assert_frame_equal (result , expected )
2040
2040
2041
+ # can append when name set
2042
+
2043
+
2041
2044
def test_append_different_columns (self ):
2042
2045
df = DataFrame ({'bools' : np .random .randn (10 ) > 0 ,
2043
2046
'ints' : np .random .randint (0 , 10 , 10 ),
You can’t perform that action at this time.
0 commit comments