[Python-ideas] Re: basic matrix object

2020-08-16 Thread Christopher Barker
On Sun, Aug 16, 2020 at 11:20 PM Stephen J. Turnbull < turnbull.stephen...@u.tsukuba.ac.jp> wrote: > It's getting the fiddly stuff right (numerical stability and accuracy, > catching edge cases in algorithms) so that you can use it with > confidence for work that has consequences if you get it wro

[Python-ideas] Re: basic matrix object

2020-08-16 Thread Stephen J. Turnbull
Greg Ewing writes: > On 16/08/20 4:26 am, Ricky Teachey wrote: > > There are certainly > > instances where I've needed to used matrices to solve a system of > > equations in an automated way. But most of time it's simply not needed, > > If we're going to have a class that supports matrix

[Python-ideas] Re: basic matrix object

2020-08-16 Thread Stephen J. Turnbull
Christopher Barker writes: > Anyway, I would like to see a nice linear algebra lib -- but not 'cause I'd > use it, only because I find it interesting. SymPy. Except that in this conversation, "linear algebra" is likely neither restricted to linearity nor so much algebraic as computational, so

[Python-ideas] Re: basic matrix object

2020-08-16 Thread Christopher Barker
On Sun, Aug 16, 2020 at 10:50 AM David Mertz wrote: > What is happening in the discussion is that each potential user who > comments finds some related capability that is relevant to their particular > needs. But the union of all those wishes is something substantially > large... Maybe not NumPy

[Python-ideas] Re: PEP 472 - regarding d[x=1, y=2] and similar

2020-08-16 Thread Greg Ewing
On 17/08/20 8:19 am, Sebastian Berg wrote: [1] The difference is that `arr[()]` extracts a scalar, while `arr[...]` returns the array (container) unchanged. This difference only matters for zero dimensional arrays. There may be reasons to prefer one over the other, but I can't think of any righ

[Python-ideas] Re: PEP 472 - regarding d[x=1, y=2] and similar

2020-08-16 Thread Caleb Donovick
*unconcerned (sorry for the spam) On Sun, Aug 16, 2020 at 3:57 PM Caleb Donovick wrote: > > Fine, so the use case you claimed was fiction. If you had just said > "DSL" instead of "anonymous protocols and dataclasses" you would have > gotten straight to the point and we would have been talking a

[Python-ideas] Re: PEP 472 - regarding d[x=1, y=2] and similar

2020-08-16 Thread Caleb Donovick
> Fine, so the use case you claimed was fiction. If you had just said "DSL" instead of "anonymous protocols and dataclasses" you would have gotten straight to the point and we would have been talking about whether extended subscription would be useful for DSLs (I can see various use cases), rather

[Python-ideas] Re: PEP 472 - regarding d[x=1, y=2] and similar

2020-08-16 Thread Sebastian Berg
On Sun, 2020-08-16 at 12:07 -0700, Guido van Rossum wrote: > On Sun, Aug 16, 2020 at 5:45 AM Steven D'Aprano > wrote: > > > On Mon, Aug 17, 2020 at 12:32:08AM +1200, Greg Ewing wrote: > > > On 16/08/20 11:49 am, Guido van Rossum wrote: > > > >SEMANTICS OF NO ARGUMENTS > > > >I can see two

[Python-ideas] Re: basic matrix object

2020-08-16 Thread Ricky Teachey
On Sun, Aug 16, 2020 at 1:19 AM Christopher Barker wrote: Well, I was trained and an engineer, but now call myself an oceanographer, but in any case, I don't need to submit my calculations for review to anyone. Though I do need to present algorithms / calculations / methods in written form that

[Python-ideas] Re: PEP 472 - regarding d[x=1, y=2] and similar

2020-08-16 Thread Guido van Rossum
On Sun, Aug 16, 2020 at 5:45 AM Steven D'Aprano wrote: > On Mon, Aug 17, 2020 at 12:32:08AM +1200, Greg Ewing wrote: > > On 16/08/20 11:49 am, Guido van Rossum wrote: > > >SEMANTICS OF NO ARGUMENTS > > >I can see two basic ways of allowing no arguments. One is for the > > >interpreter

[Python-ideas] Re: PEP 472 - regarding d[x=1, y=2] and similar

2020-08-16 Thread Guido van Rossum
On Sat, Aug 15, 2020 at 10:00 PM Steven D'Aprano wrote: > On Sat, Aug 15, 2020 at 08:26:10PM -0700, Guido van Rossum wrote: > > > Are you saying that for xarray it is important to distinguish between > > `d[day=3, detector=4]` and `d[detector=4, day=3]`? If we just passed the > > keyword args to

[Python-ideas] Re: basic matrix object

2020-08-16 Thread David Mertz
The more this discussion goes on, the more convinced I am of my initial opinion. A matrix library doesn't belong in the standard library. What is happening in the discussion is that each potential user who comments finds some related capability that is relevant to their particular needs. But the u

[Python-ideas] Re: basic matrix object

2020-08-16 Thread Tobias Kohn
+1 for the idea of a module for matrices and vectors in the stdlib. One aspect that I would like to highlight is that NumPy is not always so easily available. I got feedback from many schools that they were using tablet computers or something like Chrome books and thus basically limited to anyt

[Python-ideas] Re: Tracebacks for C code in Python

2020-08-16 Thread Steve Barnes
Ram, If you install pandas from source, (https://github.com/pandas-dev/pandas#installation-from-sources) then there is a reasonable chance that you will be able to tie the error messages to the source code. If you are finding that the error messages are not clear then I would encourage you to

[Python-ideas] Re: PEP 472 - regarding d[x=1, y=2] and similar

2020-08-16 Thread Steven D'Aprano
On Mon, Aug 17, 2020 at 12:32:08AM +1200, Greg Ewing wrote: > On 16/08/20 11:49 am, Guido van Rossum wrote: > >SEMANTICS OF NO ARGUMENTS > >I can see two basic ways of allowing no arguments. One is for the > >interpreter to construct an object that is the argument passed to > >__get

[Python-ideas] Re: Tracebacks for C code in Python

2020-08-16 Thread Stefan Behnel
Ram Rachum schrieb am 15.08.20 um 21:08: > Here's something that's been bugging me for years. I'll suggest something, > but since I'm a total newbie about this area, it's possible that everything > I'm saying is impossible or doesn't make sense. > > I'm working with some Pandas code now, and there

[Python-ideas] Re: PEP 472 - regarding d[x=1, y=2] and similar

2020-08-16 Thread Greg Ewing
On 16/08/20 11:49 am, Guido van Rossum wrote: SEMANTICS OF NO ARGUMENTS I can see two basic ways of allowing no arguments. One is for the interpreter to construct an object that is the argument passed to __getitem__ and so forth. The other is to not pass an argument at all. I

[Python-ideas] Re: Custom keywords (from: Decorators for class non function properties)

2020-08-16 Thread Chris Angelico
On Sun, Aug 16, 2020 at 10:03 PM Marco Sulla wrote: > > ...up? > What do you mean? ChrisA ___ Python-ideas mailing list -- python-ideas@python.org To unsubscribe send an email to python-ideas-le...@python.org https://mail.python.org/mailman3/lists/pyth

[Python-ideas] Re: Custom keywords (from: Decorators for class non function properties)

2020-08-16 Thread Marco Sulla
...up? On Thu, 6 Aug 2020 at 04:41, Marco Sulla wrote: > Think if you're able to do: > > > from aenum import const > @const a = 5 > > > Notice that I'm using the "at" char because I can't find a better character. > > I give the rest to your imagination: > > > # previous declarations of x in the s

[Python-ideas] Re: Tracebacks for C code in Python

2020-08-16 Thread Ram Rachum
Thanks for the responses everyone. On Sun, Aug 16, 2020 at 9:43 AM Marco Sulla wrote: > You probably wants also the python extension for gdb, to go faster to > the interesting code: > https://stackoverflow.com/q/41160447/1763602 > ___ > Python-ideas ma