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

2011-02-17 Thread Maxim
Google groups long lines wrapping breaks my code. Check this text version if you don't want to bother refactoring it: http://dl.dropbox.com/u/176092/comparison_test.sage -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-

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

2011-02-17 Thread Maxim
Well, I'd like to dig the root of the problem ;). So I'm listing the pertinent code. Also if you see performance improvement possible optimization to my code, they are very welcome, as this thing is rather slow. Abstract: Requirement was to build a pseudo random bit generator using linear congru

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

2011-02-15 Thread Maxim
Hello everyone, I'd like to know if it is required practice to cast the types of the objects being compared or if Sage should be able to deal with it automatically? Because I have a problem where I need to explicitely cast an numpy.int32 vector unit for the comparison with a Sage Integer to be re

[sage-devel] Re: New feature to disable spell-checking in the Notebook?

2010-12-06 Thread Maxim
It's definitely supported in Firefox; Opera says it will implement it in time, Webkit not for now. The good news is that even if it is only supported in Firefox for now, it has no adverse effect in other browsers. See the link below to learn more. Note that support might have progressed in other br

[sage-devel] Re: New feature to disable spell-checking in the Notebook?

2010-12-06 Thread Maxim
On 6 déc, 11:55, Adam Voss wrote: > It may be by particular configuration, but spellcheck was not > executing in workbook cells with Firefox 3 on Linux.   That's weird, I'm using Firefox 3.6 on Linux, too. As far as I can tell, spell-checking was always turned on in the workbook. > I recently m

[sage-devel] New feature to disable spell-checking in the Notebook?

2010-12-05 Thread Maxim
Hi, I would like to know if it could be considered to add a feature that would allow one to disable spell-checking inside a worksheet. I often find my code all underlined in red, and need to disable spell-checking for every code block that I create (it's on by default). What I suggest is a new fe

[sage-devel] Re: self.sum() method on vector made of int is not defined

2010-11-13 Thread Maxim
On 13 nov, 00:18, Dima Pasechnik wrote: > I don't think sum() method is needed. It's certainly a code bloat. > Could you check that sum() in vector_double_dense can be removed? > (remove it there, do sage -b, run testsuite, see if there were any > errors caused by it) I just tried that, it worked

[sage-devel] Re: Memory hits the roof when I divide a sage vector.

2010-11-12 Thread Maxim
Robert Bradshaw wrote: > [...] For almost > any kind of linear algebra, you're better off using RDF, or even numpy > directly. Thanks for that! Using numpy arrays just gave a new breath of life to my 8GB ram! Now the example in my first post takes... 277KB instead of 4.5GB, which is closer to my

[sage-devel] self.sum() method on vector made of int is not defined

2010-11-12 Thread Maxim
If I try to find the sum of a vector of floats that way, it works as expected: sage: vector([1,float(2),3]).sum() -> 6.0 However, applying the same logic on a vector made of integers: sage: vector([1,2,3]).sum() -> Traceback (click to the left of this block for traceback) ... AttributeErro

[sage-devel] Memory hits the roof when I divide a sage vector.

2010-11-12 Thread Maxim
I get very high memory usage when I do something like: sage: get_memory_usage() -> 809.9453125 sage: A=vector(range(0,1))/1 sage: get_memory_usage() -> 5393.2734375 Which is a whooping 4.5GB+ of memory to hold a 1 float vector... I would have thought more of something along the lines of 2