Re: [Numpy-discussion] float32 to float64 casting

2012-11-17 Thread Nathaniel Smith
On Fri, Nov 16, 2012 at 9:53 PM, Gökhan Sever gokhanse...@gmail.com wrote: Thanks for the explanations. For either case, I was expecting to get float32 as a resulting data type. Since, float32 is large enough to contain the result. I am wondering if changing casting rule this way, requires a

Re: [Numpy-discussion] float32 to float64 casting

2012-11-17 Thread Gökhan Sever
On Sat, Nov 17, 2012 at 9:47 AM, Nathaniel Smith n...@pobox.com wrote: On Fri, Nov 16, 2012 at 9:53 PM, Gökhan Sever gokhanse...@gmail.com wrote: Thanks for the explanations. For either case, I was expecting to get float32 as a resulting data type. Since, float32 is large enough to

Re: [Numpy-discussion] float32 to float64 casting

2012-11-17 Thread Olivier Delalleau
2012/11/17 Gökhan Sever gokhanse...@gmail.com On Sat, Nov 17, 2012 at 9:47 AM, Nathaniel Smith n...@pobox.com wrote: On Fri, Nov 16, 2012 at 9:53 PM, Gökhan Sever gokhanse...@gmail.com wrote: Thanks for the explanations. For either case, I was expecting to get float32 as a resulting

Re: [Numpy-discussion] float32 to float64 casting

2012-11-17 Thread Charles R Harris
On Sat, Nov 17, 2012 at 1:00 PM, Olivier Delalleau sh...@keba.be wrote: 2012/11/17 Gökhan Sever gokhanse...@gmail.com On Sat, Nov 17, 2012 at 9:47 AM, Nathaniel Smith n...@pobox.com wrote: On Fri, Nov 16, 2012 at 9:53 PM, Gökhan Sever gokhanse...@gmail.com wrote: Thanks for the

Re: [Numpy-discussion] float32 to float64 casting

2012-11-17 Thread Benjamin Root
On Saturday, November 17, 2012, Charles R Harris wrote: On Sat, Nov 17, 2012 at 1:00 PM, Olivier Delalleau sh...@keba.bejavascript:_e({}, 'cvml', 'sh...@keba.be'); wrote: 2012/11/17 Gökhan Sever gokhanse...@gmail.com javascript:_e({}, 'cvml', 'gokhanse...@gmail.com'); On Sat, Nov

Re: [Numpy-discussion] float32 to float64 casting

2012-11-16 Thread Olivier Delalleau
2012/11/16 Charles R Harris charlesr.har...@gmail.com On Thu, Nov 15, 2012 at 8:24 PM, Gökhan Sever gokhanse...@gmail.comwrote: Hello, Could someone briefly explain why are these two operations are casting my float32 arrays to float64? I1 (np.arange(5, dtype='float32')).dtype O1

Re: [Numpy-discussion] float32 to float64 casting

2012-11-16 Thread Olivier Delalleau
2012/11/16 Olivier Delalleau olivier.delall...@gmail.com 2012/11/16 Charles R Harris charlesr.har...@gmail.com On Thu, Nov 15, 2012 at 11:37 PM, Charles R Harris charlesr.har...@gmail.com wrote: On Thu, Nov 15, 2012 at 8:24 PM, Gökhan Sever gokhanse...@gmail.comwrote: Hello, Could

Re: [Numpy-discussion] float32 to float64 casting

2012-11-16 Thread Nathaniel Smith
On Fri, Nov 16, 2012 at 6:37 AM, Charles R Harris charlesr.har...@gmail.com wrote: On Thu, Nov 15, 2012 at 8:24 PM, Gökhan Sever gokhanse...@gmail.com wrote: Hello, Could someone briefly explain why are these two operations are casting my float32 arrays to float64? I1 (np.arange(5,

Re: [Numpy-discussion] float32 to float64 casting

2012-11-16 Thread Gökhan Sever
Thanks for the explanations. For either case, I was expecting to get float32 as a resulting data type. Since, float32 is large enough to contain the result. I am wondering if changing casting rule this way, requires a lot of modification in the NumPy code. Maybe as an alternative to the current

[Numpy-discussion] float32 to float64 casting

2012-11-15 Thread Gökhan Sever
Hello, Could someone briefly explain why are these two operations are casting my float32 arrays to float64? I1 (np.arange(5, dtype='float32')).dtype O1 dtype('float32') I2 (10*np.arange(5, dtype='float32')).dtype O2 dtype('float64') I3 (np.arange(5, dtype='float32')[0]).dtype O3

Re: [Numpy-discussion] float32 to float64 casting

2012-11-15 Thread Charles R Harris
On Thu, Nov 15, 2012 at 8:24 PM, Gökhan Sever gokhanse...@gmail.com wrote: Hello, Could someone briefly explain why are these two operations are casting my float32 arrays to float64? I1 (np.arange(5, dtype='float32')).dtype O1 dtype('float32') I2 (10*np.arange(5,

Re: [Numpy-discussion] float32 to float64 casting

2012-11-15 Thread Charles R Harris
On Thu, Nov 15, 2012 at 11:37 PM, Charles R Harris charlesr.har...@gmail.com wrote: On Thu, Nov 15, 2012 at 8:24 PM, Gökhan Sever gokhanse...@gmail.comwrote: Hello, Could someone briefly explain why are these two operations are casting my float32 arrays to float64? I1 (np.arange(5,