Skip to content

Commit

Permalink
Merge commit 'v0.9.0-169-g5c945e1' into debian
Browse files Browse the repository at this point in the history
* commit 'v0.9.0-169-g5c945e1':
  BUG: fill_value not being applied for mixed type frame pandas-dev#2191
  BUG: bug in setup.py with cython and sdist command class pandas-dev#2188
  BLD: c scope decl wrong
  • Loading branch information
yarikoptic committed Nov 7, 2012
2 parents b159fc1 + 5c945e1 commit 726a8b9
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 7 deletions.
2 changes: 1 addition & 1 deletion pandas/core/frame.py
Expand Up @@ -3320,7 +3320,7 @@ def _arith_op(left, right):
# XXX no good for duplicate columns
result = {}
for col in this:
result[col] = func(this[col].values, other[col].values)
result[col] = _arith_op(this[col].values, other[col].values)
else:
result = _arith_op(this.values, other.values)

Expand Down
5 changes: 3 additions & 2 deletions pandas/src/numpy_helper.h
Expand Up @@ -136,7 +136,8 @@ char_to_string(char* data) {
#include <errno.h>
#include <float.h>

double PANDAS_INLINE xstrtod(const char *p, char **q, char decimal, char sci, int skip_trailing);
PANDAS_INLINE double
xstrtod(const char *p, char **q, char decimal, char sci, int skip_trailing);

int to_double(char *item, double *p_value, char sci, char decimal)
{
Expand Down Expand Up @@ -250,7 +251,7 @@ PANDAS_INLINE void uppercase(char *p) {
}


double PANDAS_INLINE xstrtod(const char *str, char **endptr, char decimal,
PANDAS_INLINE double xstrtod(const char *str, char **endptr, char decimal,
char sci, int skip_trailing)
{
double number;
Expand Down
7 changes: 7 additions & 0 deletions pandas/tests/test_frame.py
Expand Up @@ -6086,6 +6086,13 @@ def test_combineAdd(self):
comb = df1.combineAdd(df2)
assert_frame_equal(comb, df3)

# mixed type GH2191
df1 = DataFrame({'A' : [1, 2], 'B' : [3, 4]})
df2 = DataFrame({'A' : [1, 2], 'C' : [5, 6]})
rs = df1.combineAdd(df2)
xp = DataFrame({'A' : [2, 4], 'B' : [3, 4.], 'C' : [5, 6.]})
assert_frame_equal(xp, rs)

# TODO: test integer fill corner?

def test_combineMult(self):
Expand Down
6 changes: 2 additions & 4 deletions setup.py
Expand Up @@ -538,14 +538,12 @@ def run(self):
cmdclass['build_ext'] = build_ext
if BUILD_CACHE_DIR: # use the cache
cmdclass['build_ext'] = CachingBuildExt
cmdclass['cython'] = CythonCommand
cmdclass['sdist'] = CheckSDist
else:

suffix = '.c'
cmdclass['build_src'] = DummyBuildSrc

cmdclass['cython'] = CythonCommand
cmdclass['build_ext'] = build_ext
cmdclass['sdist'] = CheckSDist

tseries_depends = ['reindex', 'groupby', 'skiplist', 'moments',
'reduce', 'stats', 'datetime',
Expand Down

0 comments on commit 726a8b9

Please sign in to comment.