Re: [Numpy-discussion] [help needed] associativity and precedence of '@'

2014-03-19 Thread Andrew Dalke
On Mar 15, 2014, at 4:41 AM, Nathaniel Smith wrote: > OPTION 1 FOR @: ... "same-left" > OPTION 2 FOR @: ... "weak-right" > OPTION 3 FOR @: ... "tight-right" (In addition to more unusual forms, like 'grouping'.) There's another option, which is to "refuse the temptation to guess", and not allow

Re: [Numpy-discussion] Dates and times and Datetime64 (again)

2014-03-19 Thread Sankarshan Mudkavi
On Mar 19, 2014, at 10:01 AM, Dave Hirschfeld wrote: > Jeff Reback gmail.com> writes: > >> >> Dave, >> >> your example is not a problem with numpy per se, rather that the default > generation is in local timezone (same as what python datetime does). >> If you localize to UTC you get the res

Re: [Numpy-discussion] [help needed] associativity and precedence of '@'

2014-03-19 Thread Nathaniel Smith
On Sat, Mar 15, 2014 at 3:41 AM, Nathaniel Smith wrote: > I think we need to > know something about how often the Mat @ Mat @ vec type cases arise in > practice. How often do non-scalar * and np.dot show up in the same > expression? How often does it look like a * np.dot(b, c), and how often does

Re: [Numpy-discussion] [help needed] associativity and precedence of '@'

2014-03-19 Thread josef . pktd
On Wed, Mar 19, 2014 at 2:24 PM, Nathaniel Smith wrote: > On Tue, Mar 18, 2014 at 9:14 AM, Robert Kern > wrote: > > On Tue, Mar 18, 2014 at 12:54 AM, Nathaniel Smith wrote: > >> On Sat, Mar 15, 2014 at 6:28 PM, Nathaniel Smith wrote: > >>> Mathematica: instead of having an associativity, a @ b

Re: [Numpy-discussion] [help needed] associativity and precedence of '@'

2014-03-19 Thread Nathaniel Smith
On Tue, Mar 18, 2014 at 9:14 AM, Robert Kern wrote: > On Tue, Mar 18, 2014 at 12:54 AM, Nathaniel Smith wrote: >> On Sat, Mar 15, 2014 at 6:28 PM, Nathaniel Smith wrote: >>> Mathematica: instead of having an associativity, a @ b @ c gets >>> converted into mdot([a, b, c]) >> >> So, I've been thi

Re: [Numpy-discussion] Dates and times and Datetime64 (again)

2014-03-19 Thread Dave Hirschfeld
Jeff Reback gmail.com> writes: > > Dave, > > your example is not a problem with numpy per se, rather that the default generation is in local timezone (same as what python datetime does). > If you localize to UTC you get the results that you expect.  > The problem is that the default datetime

Re: [Numpy-discussion] [RFC] should we argue for a matrix power operator, @@?

2014-03-19 Thread Andrew Jaffe
On 16/03/2014 01:31, josef.p...@gmail.com wrote: > > > > On Sat, Mar 15, 2014 at 8:47 PM, Warren Weckesser > mailto:warren.weckes...@gmail.com>> wrote: > > > On Sat, Mar 15, 2014 at 8:38 PM, > wrote: > > I think I wouldn't use anything like @@ often eno

Re: [Numpy-discussion] Dates and times and Datetime64 (again)

2014-03-19 Thread Jeff Reback
Dave, your example is not a problem with numpy per se, rather that the default generation is in local timezone (same as what python datetime does). If you localize to UTC you get the results that you expect. In [49]: dates = pd.date_range('01-Apr-2014', '04-Apr-2014', freq='H')[:-1] In [50]: pd.

Re: [Numpy-discussion] Dates and times and Datetime64 (again)

2014-03-19 Thread Dave Hirschfeld
Sankarshan Mudkavi uwaterloo.ca> writes: > > Hey all, > It's been a while since the last datetime and timezones discussion thread was visited (linked below): > > http://thread.gmane.org/gmane.comp.python.numeric.general/53805 > > It looks like the best approach to follow is the UTC only appro