Re: [sage-devel] Python3

2016-05-20 Thread D. S. McNeil
On the subject of 3, for anyone who hasn't been following, a number of teams on the science stack have thought about Aaron's argument and are making plans: https://python3statement.github.io/ Doug -- You received this message because you are subscribed to the Google Groups "sage-devel" group.

Re: [sage-devel] On scientific computing, Python and Julia

2014-08-21 Thread D. S. McNeil
Having been dabbling in Julia myself, I can agree it's definitely worth a look for people interested in numerical programming and lispy metaprogramming facilities. For people coming from other languages it can take a while to figure out where exactly you're supposed to *put* things, and the type s

Re: [sage-devel] "Graph??" produces a crash ?... O_o

2014-03-26 Thread D. S. McNeil
I think this is at heart an IPython-related bug, not something Sage-specific. I can't reproduce this at the moment -- natch -- but I've had exactly this symptom from time to time when using ?? to look at source when using IPython outside of Sage. One afternoon it was driving me crazy but I was to

Re: [sage-devel] gcd regression (?)

2013-02-20 Thread D. S. McNeil
On Wed, Feb 20, 2013 at 4:58 PM, kcrisman wrote: > This caused an interact in class today to break. Yikes. Why does this no > longer work? > > -- > | Sage Version 5.7.rc0, Release Date: 2013-02-16 | > | Type

Re: [sage-devel] Re: Sage Explorer / adding type information to functions

2013-01-31 Thread D. S. McNeil
> Ah, interesting. I guess Guido just didn't like part of the > notation.Note that the declaration doesn't actually do anything: > def f(a: int, b: float) -> (float, str): > ... print(a,b) > ... f(2.5,3) > 2.5 3 Yeah, IIRC enforcing this was a non-starter, and the decision was to

Re: [sage-devel] Re: Sage Explorer / adding type information to functions

2013-01-31 Thread D. S. McNeil
>> As far as I understand, Python 3 will allow to achieve the same using >> the natural syntax `def f(x: int, y: float) : ...`, with flexibility >> on what "type" can be. > > Unfortunately, type declarations, with that syntax, was *proposed* for > Python 3, but then soundly rejected by Guido as "to

Re: [sage-devel] Re: Patch for matrix_plot.py, Feature enhancement.

2012-10-29 Thread D. S. McNeil
Cool! On Mon, Oct 29, 2012 at 5:25 PM, Volker Braun wrote: > Great! Can you make a trac account for yourself and a ticket with your > patch? The patch needs a commit message. Also, minor nitpick: > > if len(extent_) is not 4: > raise TypeError, "extent must be a list with 4 el

Re: [sage-devel] Strange performance (bug?) computing a specific determinant

2012-09-06 Thread D. S. McNeil
> That said, I am wondering if this is perhaps a bug in the default > implementation of determinant()? > It seems strange to me that it takes 8 minutes to compute a determinant of a > 34x34 matrix while other algorithms do it within a second. Yeah, it looks like pari's Gauss-Bareiss takes foreve

Re: [sage-devel] http://sagenb.org

2012-06-27 Thread D. S. McNeil
On Wed, Jun 27, 2012 at 12:24 PM, William Stein wrote: > Hello sage-devel/sage-notebook. > > I'm aware that http://sagenb.org is down, so there is no need for > anybody to email me about this. > > It may be down for some time, due to abusive users.    It (or > something similar) will definitely be

Re: [sage-devel] Bug in sparse matrix display code?

2012-06-11 Thread D. S. McNeil
> So is this a bug, or is there some subtle aspect of the set { ... } > constuction that I'm misusing? Oy, that's cute! The second matrix index lives in Zmod(5), and behaves as such: sage: wA = matrix(QuadraticField(2),5,{(j,mod(j+1,5)):1 for j in range(5)}) sage: wA.dict() {(0, 1): 1, (1, 2): 1

Re: [sage-devel] sage-5.0 serious bug: segfaults in basic linear algebra?

2012-06-08 Thread D. S. McNeil
>> I used the "for loop" from earlier in the thread on Mac OS X (both 10.6.8 >> and 10.7.4).  In both cases, all worked w/o crashing. >> >> Does this happen rarely, sometimes, frequently? > > It occurred for me about 4 times interactively while working on > research yesterday.   Anyway, thanks for

Re: [sage-devel] Re: Binary testers needed

2012-05-30 Thread D. S. McNeil
On Wed, May 30, 2012 at 3:28 PM, Dima Pasechnik wrote: > On 2012-05-30, Jeroen Demeyer wrote: >> All of you who had trouble with "Illegal Instruction" errors or with the >> Boost library on the sage-5.0 binaries: > on OSX 10.6.8, Core 2 Duo, the corresponding ("64-bit") non-app binary > appears

Re: [sage-devel] Re: default ellipse color

2012-02-27 Thread D. S. McNeil
>> sage: x,y = var('x y') >> sage: plot_slope_field(sin(x+y)+cos(x+y), (x,-3,3), (y,-3,3)) >> >> I think the documentation should explain the warnings, or the example >> should be changed, right? > > This happens to be a known numpy bug.  See: > > http://trac.sagemath.org/sage_trac/ticket/11208 > >

Re: [sage-devel] Re: integration bug, segfault

2012-02-21 Thread D. S. McNeil
> I think it's very appropriate to open a ticket for this.  It would be > even more appropriate to try to construct a more minimal > counterexample :) but at least then we have it on the record. So far the best I can do is f(t) = e^(-(4.007 - 3*I)*t) integral(f, (t, 0, infinity)) *boom* and not

Re: [sage-devel] Want to run a patchbot?

2012-02-10 Thread D. S. McNeil
On Fri, Feb 10, 2012 at 4:27 AM, Robert Bradshaw wrote: > It's easy. > > 1) Download and build a pristine copy of Sage for testing. > 2) Apply http://trac.sagemath.org/sage_trac/ticket/12486 to the > sage-scripts directory. > 3) Run sage --patchbot There are maybe two tweaks to these directions I

Re: [sage-devel] Re: notebook image caching?

2011-12-17 Thread D. S. McNeil
> I pushed the change to test.sagenb.org.  Can you verify that the problem is > fixed there?  Whenever sagenb.org is rebooted, the change will take effect > there too. Looks to have fixed it. As long as the random seed on the notebook code side can't accidentally be changed from within a cell, it

[sage-devel] notebook image caching?

2011-12-16 Thread D. S. McNeil
There was a question on ask.sagemath.org -- http://ask.sagemath.org/question/995/show-function-for-graphs-is-not-working -- about some unusual graph display issues, where the graph plot being shown didn't seem to correspond to the graph. My first thought was that it was user error, esp. given that

Re: [sage-devel] Numeric evaluation of error function erf (#11948) needs review

2011-12-15 Thread D. S. McNeil
On Thu, Dec 15, 2011 at 5:29 PM, Jeroen Demeyer wrote: > This patch to properly evaluate erf() still needs review, it should > apply cleanly to sage-4.8.alpha2 or later: There's also http://trac.sagemath.org/sage_trac/ticket/1173 with a different approach. I'm fine with letting #1173 fade in fav

Re: [sage-devel] matching polynomial of a graph

2011-12-14 Thread D. S. McNeil
> Any ideas on the cube graph error? I tried giving it an integer, but it > still wasn't happy. The TypeError looks like a sign that someone assumed that the vertices would be integers and non-integer labels managed to sneak through some code path somehow. No idea how long CubeGraph(5) would take

Re: [sage-devel] Re: Missing digits in numerical_approx

2011-12-14 Thread D. S. McNeil
I think problems caused by the log(10,2) ~ 3.32192 assumption occur in several places throughout Sage, and it's the source of at least one bug report (http://trac.sagemath.org/sage_trac/ticket/10164). The following all look suspicious to me: misc/functional.py:prec = int((digits+1) *

Re: [sage-devel] Re: bug in generating regular graphs?

2011-10-13 Thread D. S. McNeil
Property doesn't work quite like you think it might: the property needs to possess certain inheritance features. (Frankly, I might have named it "heritable_property" or something instead.) http://trac.sagemath.org/sage_trac/ticket/6210 and http://groups.google.com/group/sage-devel/browse_thread

Re: [sage-devel] Re: Fractal Newton basins = Need Cython help!

2011-09-24 Thread D. S. McNeil
Leif wrote: > Any reasonable compiler does constant folding and loop-invariant code > motion; even Python's byte-code compiler should do that. Almost none is done. Only the most trivial cases are handled. For example, addition: sage: preparser(False) sage: type(2) sage: def f(): :

Re: [sage-devel] Fractal Newton basins = Need Cython help!

2011-09-22 Thread D. S. McNeil
> However, it is super slow, because my Cython is very bad.  The image > at #11837 took a few minutes to produce on my reasonably new laptop. > That's not even close to good enough. I think replacing 2/3 with 2./3 in if abs(varia-root)<2/3: will help a little.. :^) By itself, th

Re: [sage-devel] Re: Users of older OS X versions (< 10.6): please test

2011-05-01 Thread D. S. McNeil
Build succeeded and passed testall long for me on 10.5.8, xcode 3 (921.0/893.0), i686-apple-darwin9-gcc-4.0.1/i686-apple-darwin9-g++-4.0.1. Quad-Core Intel Xeon. Doug -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-d

Re: [sage-devel] Some comments about the notebook's home page.

2011-04-28 Thread D. S. McNeil
> I would not want the debate to move on to > centre/center and so on. I'm forever forgetting to use the American spellings for centre and neighbour in Sage. There is one case where I think the use of Americanisms means Sage is simply wrong: the use of 'meter' for 'metre' in the units module. I'

Re: [sage-devel] Bug with numpy matrices and sage integers

2011-03-13 Thread D. S. McNeil
> Does anyone have any idea why using a sage integer to index a numpy > matrix would give me a row vector?! 9 times out of 10 behaviour like that's due to explicit type-checking at some point instead of try-it-and-see duck typing.. and that seems to be the case here (discussion on trac). Doug -

Re: [sage-devel] Re: Preparsing madness...

2011-03-02 Thread D. S. McNeil
>> For what reason is var(s) not raising an error if not s.isalnum()? > > People might want to use utf-8 strings which won't be valid under that > condition. Even "x_1" fails an alnum check. Another issue with var is that Python allows trailing commas in the definitions of lists, sets, and tuples

Re: [sage-devel] Assignment of matrix to a matrix slice fails in the 1x1 case

2011-02-27 Thread D. S. McNeil
On Mon, Feb 28, 2011 at 11:12 AM, Stephen Hartke wrote: > Assignment of a matrix to a matrix slice works as expected except for when > the slice is 1x1; in that case, Sage expects a scalar instead of a 1x1 > matrix. I think this has changed very recently. Your code seems to work in 4.6.2.rc0, bu

Re: [sage-devel] Re: Updating the Developer's Walk-Through

2011-02-21 Thread D. S. McNeil
(1) I just started playing with this stuff, and found queues much nicer than cloning; it's worth It might be good to add a few explanations to the page of what to do in common-screwup cases (at least for me): e.g. unapplying everything (even though there are uncommitted changes), undoing an accid

Re: [sage-devel] Comparison of Integer & numpy.int32 fails... but not always?

2011-02-17 Thread D. S. McNeil
On Wed, Feb 16, 2011 at 5:53 AM, Maxim wrote: > It would sometimes see a '1' Integer not being the same as a > '1' numpy.int32 value. > > This behaviour _cannot_ be reproduced with a minimal example such as: > > import numpy > > if numpy.int32(1) != sage.rings.integer.Integer(1): >    print("Shou

Re: [sage-devel] Re: AskSage oddity

2011-02-13 Thread D. S. McNeil
Don't comments show up on the main page via the mailbox on the top of the page? I don't have email notification attached and I see it flag when there's something new for me to look at in the comments. I seem to get responses as often as I do on other question sites, so I don't know if this is as

Re: [sage-devel] Re: gcd lcm and numberfields

2011-02-11 Thread D. S. McNeil
Well, someone asked for more posts.. not sure this is what he had in mind. ;-) Forgive my being a bear of little brain, but I've yet to grasp why defining the default gcd rational function to be equal to 1 or (from Simon) the lcm equal to 1 would be a _useful_ thing to do, independent of the exis

Re: [sage-devel] sage thoughts

2011-02-11 Thread D. S. McNeil
On Thu, Feb 10, 2011 at 9:38 PM, Nicolas M. Thiery wrote: > However one should be careful: the kwarg > options are *not* mutually exclusive as long as they are consistent > (for some loose definition of consistent), and this feature is used in > many places. My single most common use involves par

Re: [sage-devel] Re: sage thoughts

2011-02-10 Thread D. S. McNeil
@rjf: > I don't know exactly how this came up, but if 2/1 is in a different domain > (rational) from 2, (integer), then gcd should probably be 1, since any > non-zero rational number divides any other, and one commonly uses the > positive "unit" 1 for such a case. One also commonly uses the c

Re: [sage-devel] sage thoughts

2011-02-09 Thread D. S. McNeil
>> (1) gcd is broken.    http://trac.sagemath.org/sage_trac/ticket/10459 [..] > I'm personally OK either way with this. IMO a*b = gcd(a,b)*lcm(a,b) should be maintained wherever possible. There are pari codes whose direct Sage equivalent silently breaks for this reason, and I can't bring myself to

[sage-devel] sage thoughts

2011-02-08 Thread D. S. McNeil
Hello! First time poster, so brief introduction: planetary astronomer, been using Sage for years for both science and fun. I'm also one of the Editors-in-Chief of the OEIS, and have been experimenting with using Sage for bulk sequence processing and verification. I find writing in Sage very comp