You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
X = np.random.rand(10,10)
Y = np.ones((10,1),dtype=int)
df1 = pandas.DataFrame(X)
df1 = df1.join(pandas.DataFrame(Y),lsuffix='.X')
print df1-df1.mean()
Traceback (most recent call last):
File "pls_model.py", line 383, in
run(df)
File "pls_model.py", line 305, in run
report(df.copy(),n_comp,priors=priors,plot=False)
File "pls_model.py", line 83, in report
plsgnb.fit(X,Y,priors=priors)
File "C:\src\multivariate\src\multivariate\PLS.py", line 477, in fit
self.model.fit(X,Y)
File "C:\src\multivariate\src\multivariate\PLS.py", line 145, in fit
print x - self.Xmean
File "C:\src\pandas\pandas\core\frame.py", line 177, in f
return self._combine_series(other, func, fill_value, axis, level)
File "C:\src\pandas\pandas\core\frame.py", line 2526, in _combine_series
return self._combine_series_infer(other, func, fill_value)
File "C:\src\pandas\pandas\core\frame.py", line 2541, in _combine_series_infer
return self._combine_match_columns(other, func, fill_value)
File "C:\src\pandas\pandas\core\frame.py", line 2552, in _combine_match_columns
left, right = self.align(other, join='outer', axis=1, copy=False)
File "C:\src\pandas\pandas\core\frame.py", line 1735, in align
method=method)
File "C:\src\pandas\pandas\core\frame.py", line 1804, in _align_series
return (left_result.fillna(fill_value, method=method),
File "C:\src\pandas\pandas\core\frame.py", line 2426, in fillna
new_data = self._data.fillna(value)
File "C:\src\pandas\pandas\core\internals.py", line 938, in fillna
new_blocks = [b.fillna(value) for b in self.blocks]
File "C:\src\pandas\pandas\core\internals.py", line 211, in fillna
new_values.flat[mask] = value
ValueError: cannot convert float NaN to integer
The text was updated successfully, but these errors were encountered:
I just checked this against 0.7.0 and the problem is not present. This is related to 0.7.1. Would this problem also be a good candidate to include in the tests?
Sample code to reproduce the error:
import numpy as np
import pandas
X = np.random.rand(10,10)
Y = np.ones((10,1),dtype=int)
df1 = pandas.DataFrame(X)
df1 = df1.join(pandas.DataFrame(Y),lsuffix='.X')
print df1-df1.mean()
Traceback (most recent call last):
File "pls_model.py", line 383, in
run(df)
File "pls_model.py", line 305, in run
report(df.copy(),n_comp,priors=priors,plot=False)
File "pls_model.py", line 83, in report
plsgnb.fit(X,Y,priors=priors)
File "C:\src\multivariate\src\multivariate\PLS.py", line 477, in fit
self.model.fit(X,Y)
File "C:\src\multivariate\src\multivariate\PLS.py", line 145, in fit
print x - self.Xmean
File "C:\src\pandas\pandas\core\frame.py", line 177, in f
return self._combine_series(other, func, fill_value, axis, level)
File "C:\src\pandas\pandas\core\frame.py", line 2526, in _combine_series
return self._combine_series_infer(other, func, fill_value)
File "C:\src\pandas\pandas\core\frame.py", line 2541, in _combine_series_infer
return self._combine_match_columns(other, func, fill_value)
File "C:\src\pandas\pandas\core\frame.py", line 2552, in _combine_match_columns
left, right = self.align(other, join='outer', axis=1, copy=False)
File "C:\src\pandas\pandas\core\frame.py", line 1735, in align
method=method)
File "C:\src\pandas\pandas\core\frame.py", line 1804, in _align_series
return (left_result.fillna(fill_value, method=method),
File "C:\src\pandas\pandas\core\frame.py", line 2426, in fillna
new_data = self._data.fillna(value)
File "C:\src\pandas\pandas\core\internals.py", line 938, in fillna
new_blocks = [b.fillna(value) for b in self.blocks]
File "C:\src\pandas\pandas\core\internals.py", line 211, in fillna
new_values.flat[mask] = value
ValueError: cannot convert float NaN to integer
The text was updated successfully, but these errors were encountered: