On Tue, Mar 6, 2012 at 2:03 PM, Denis Laxalde <denis.laxa...@mcgill.ca>wrote:
> Hi, > > >>> np.__version__ > '1.7.0.dev-7c07089' > >>> p = np.poly1d([1,1]) > >>> p + 1.0 > poly1d([ 1., 2.]) > >>> p + np.float64(1) > poly1d([ 1., 2.]) > >>> np.float64(1.0) + p > array([ 2., 2.]) > >>> np.int64(1) + p > array([2, 2]) > >>> np.int(1) + p > poly1d([1, 2]) > >>> np.int64(1)*p > array([1, 1]) > > What's happening here? I'd expect operations with polynomials would > return a polynomial. > Use polynomial.Polynomial and you won't have this problem. Chuck
_______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion