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 > > > wrote: > >> 2012/11/17 Gökhan Sever > 'cvml', 'gokhanse...@gmail.com');>> >> >>> >>> >>> On Sat, Nov 17, 2012 at 9:47 AM, Nathaniel Smith >>> >>> > wrote: >>> On Fri, Nov

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 wrote: > 2012/11/17 Gökhan Sever > >> >> >> On Sat, Nov 17, 2012 at 9:47 AM, Nathaniel Smith wrote: >> >>> On Fri, Nov 16, 2012 at 9:53 PM, Gökhan Sever >>> wrote: >>> > Thanks for the explanations. >>> > >>> > For either case, I was expecting

Re: [Numpy-discussion] float32 to float64 casting

2012-11-17 Thread Olivier Delalleau
2012/11/17 Gökhan Sever > > > On Sat, Nov 17, 2012 at 9:47 AM, Nathaniel Smith wrote: > >> On Fri, Nov 16, 2012 at 9:53 PM, Gökhan Sever >> wrote: >> > Thanks for the explanations. >> > >> > For either case, I was expecting to get float32 as a resulting data >> type. >> > Since, float32 is larg

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 wrote: > On Fri, Nov 16, 2012 at 9:53 PM, Gökhan Sever > 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 wonde

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 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 lot of modificati

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 ca

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 wrote: > On Thu, Nov 15, 2012 at 8:24 PM, Gökhan Sever 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('fl

Re: [Numpy-discussion] float32 to float64 casting

2012-11-16 Thread Olivier Delalleau
2012/11/16 Olivier Delalleau > 2012/11/16 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 wrote: >>> Hello, Could someone briefly explain why are thes

Re: [Numpy-discussion] float32 to float64 casting

2012-11-16 Thread Olivier Delalleau
2012/11/16 Charles R Harris > > > On Thu, Nov 15, 2012 at 8:24 PM, Gökhan Sever 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*n

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 wrote: > >> Hello, >> >> Could someone briefly explain why are these two operations are casting my >> float32 arrays to float64? >> >> I1 (np.arange(5, dtype='

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 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, dtype='float32')).dtype > O2 dtyp

[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 dtype('fl