Dear Martin,
On 24 Jan., 00:50, Martin Albrecht <[EMAIL PROTECTED]>
wrote:
> > This looks strange to me (close to a bug).
>
> This is not a bug but a deliberate design decision that an ideal is a distinct
> mathematical object from a set of polynomials spanning the ideal.
OK, as a conscious deci
Let me be the first of many (i like this game :-) to give you
(hopefully) the final solution:
sage: def partition(v,n,pad=0):
...return [(v+[pad]*(n-len(v)%n))[i:i+n] for i in
range(0,len(v),n)]
-vgermrk-
On 24 Jan., 01:34, Jason Grout <[EMAIL PROTECTED]> wrote:
> [EMAIL PROTECTED] w
Let me be the first of many (i like this game :-) to give you
(hopefully) the final solution:
def partition(v,n,pad=0):
return [(v+[pad]*(n-len(v)%n))[i:i+n] for i in range(0,len(v),n)]
-vgermrk-
On 24 Jan., 01:34, Jason Grout <[EMAIL PROTECTED]> wrote:
> [EMAIL PROTECTED] wrote:
>
> > O
Let me be the first of many ;-) to say that's maybe more efficient to
use a temporary variable for the padding:
def partition(v,n,pad=0):
t=(v+[pad]*(n-len(v)%n))
return [t[i:i+n] for i in range(0,len(v),n)]
-vgermrk-
On 24 Jan., 09:46, vgermrk <[EMAIL PROTECTED]> wrote:
> Let me be
On Jan 23, 2008 4:34 PM, Jason Grout <[EMAIL PROTECTED]> wrote:
>
>
> [EMAIL PROTECTED] wrote:
> >
> >
> >
> > On Wed, 23 Jan 2008, William Stein wrote:
> >
> >> On Jan 23, 2008 4:12 PM, Jason Grout <[EMAIL PROTECTED]> wrote:
> >>> Does anyone know the best way to partition a list into sublists of
[EMAIL PROTECTED] wrote:
>
>
>
> On Wed, 23 Jan 2008, Jason Grout wrote:
>
>>
>> Robert's patch on trac #1900 affords an opportunity to bring up a small
>> simplification of adjacency_matrix(). It seems that the over_integers
>> parameter over-complicates the interface. There are other more
William Stein wrote:
> On Jan 23, 2008 4:34 PM, Jason Grout <[EMAIL PROTECTED]> wrote:
>>
>> [EMAIL PROTECTED] wrote:
>>>
>>>
>>> On Wed, 23 Jan 2008, William Stein wrote:
>>>
On Jan 23, 2008 4:12 PM, Jason Grout <[EMAIL PROTECTED]> wrote:
> Does anyone know the best way to partition a li
On Jan 24, 2008 5:32 AM, Jason Grout <[EMAIL PROTECTED]> wrote:
>
>
> William Stein wrote:
> > On Jan 23, 2008 4:34 PM, Jason Grout <[EMAIL PROTECTED]> wrote:
> >>
> >> [EMAIL PROTECTED] wrote:
> >>>
> >>>
> >>> On Wed, 23 Jan 2008, William Stein wrote:
> >>>
> On Jan 23, 2008 4:12 PM, Jason
On Jan 24, 1:47 pm, "William Stein" <[EMAIL PROTECTED]> wrote:
>
> Thanks. I would actually strongly encourage you or somebody to
> sit down and actually write a function that has the _same_ functionality
> as http://reference.wolfram.com/mathematica/ref/Partition.html
Hi, i would also suggest t
The discussion related to #1900 brings up a point about backwards
compatibility. Last summer, it seemed like we could change the
interface from version to version and it wasn't a big deal---the
community was small enough and updated often enough that we weren't
worried about preserving or eve
Harald Schilly wrote:
> On Jan 24, 1:47 pm, "William Stein" <[EMAIL PROTECTED]> wrote:
>> Thanks. I would actually strongly encourage you or somebody to
>> sit down and actually write a function that has the _same_ functionality
>> as http://reference.wolfram.com/mathematica/ref/Partition.html
>
I just ran out of space on my laptop hard-drive, and in cleaning it up
to make more room I found something that perhaps folks are not aware
of. My 2.10 install was taking up about 20 GB of space; most of that
was in one file, sage/gsl/.doctest/out, which was about 18 GB. I
think this installatio
On Jan 24, 2008 7:32 AM, Jacob Hicks <[EMAIL PROTECTED]> wrote:
> After playing with histograms for a while in sage, I have started to delve
> into the source and documentation of rpy. I want to make it work more
> seamlessly with sage than it does now. My first priority, which would be of
> imm
Jason Grout wrote:
> recursion is implemented, so you run into recursion depth problems, and
> the support for functional idioms is only going to get "worse", if I
> understand the future of Python correctly). On the bright side, list
> comprehensions replace a lot of the need and do it very
On Jan 24, 2008 7:14 AM, Jason Grout <[EMAIL PROTECTED]> wrote:
>
> The discussion related to #1900 brings up a point about backwards
> compatibility. Last summer, it seemed like we could change the
> interface from version to version and it wasn't a big deal---the
> community was small enough an
William Stein wrote:
> On Jan 24, 2008 7:14 AM, Jason Grout <[EMAIL PROTECTED]> wrote:
>> The discussion related to #1900 brings up a point about backwards
>> compatibility. Last summer, it seemed like we could change the
>> interface from version to version and it wasn't a big deal---the
>> comm
I don't like the forced padding out of the last chunk (mostly because my code
which uses a function like this doesn't call for one)
def partition(v,n,pad=0):
if pad is not None:
t=(v+[pad]*(n-len(v)%n))
return [t[i:i+n] for i in range(0,len(v),n)]
of course, this makes it so
On Jan 24, 2008 8:12 AM, Jason Grout <[EMAIL PROTECTED]> wrote:
>
>
> William Stein wrote:
> > On Jan 24, 2008 7:14 AM, Jason Grout <[EMAIL PROTECTED]> wrote:
> >> The discussion related to #1900 brings up a point about backwards
> >> compatibility. Last summer, it seemed like we could change the
[EMAIL PROTECTED] wrote:
> I don't like the forced padding out of the last chunk (mostly because my code
> which uses a function like this doesn't call for one)
>
> def partition(v,n,pad=0):
> if pad is not None:
> t=(v+[pad]*(n-len(v)%n))
> return [t[i:i+n] for i in range(0,l
(This was posted to the SIGSAM list. Posted here FYI.)
2008 CALL FOR NOMINATIONS
ACM/SIGSAM Richard D. Jenks Memorial Prize
for Excellence in Computer Algebra Software Engineering
The third Richard D. Jenks Memorial Prize for excellence in software
engineering for computer algebra will be award
On Thu, 24 Jan 2008, Jason Grout wrote:
>
> [EMAIL PROTECTED] wrote:
>> I don't like the forced padding out of the last chunk (mostly because my
>> code which uses a function like this doesn't call for one)
>>
>> def partition(v,n,pad=0):
>> if pad is not None:
>> t=(v+[pad]*(n-
OK I think I have learned a little. The following code seems to flush
the output properly, and sends it to the current cell.
r.postscript(os.curdir+'/out.ps')
r.par(ann=0)
values = [x for x in srange(0,float(pi),.1)]
r.plot(values, [sin(x) for x in values], type='lines')
r.dev_off()
On Jan 24,
Hello,
Today I witnessed a mathematica user struggling with Sage because of
the way Sage handles infinity. On trac #1915 you can see an example.
On Thu, 17 Jan 2008 09:52:32 -0500
David Harvey <[EMAIL PROTECTED]> wrote:
> Question: why does the "unsigned infinity ring" not have a zero
> eleme
I think the best way to handle deprecation is to throw an error when
the (now invalid) command/options are being used. This way any users
of the code will know exactly what the problem is, no matter if they
wrote it or how deep it is. After a period of time, this error code
can be removed.
On Jan 24, 7:28 am, mhampton <[EMAIL PROTECTED]> wrote:
> I just ran out of space on my laptop hard-drive, and in cleaning it up
> to make more room I found something that perhaps folks are not aware
> of. My 2.10 install was taking up about 20 GB of space; most of that
> was in one file, sage/gs
Robert Bradshaw wrote:
> I think the best way to handle deprecation is to throw an error when
> the (now invalid) command/options are being used. This way any users
> of the code will know exactly what the problem is, no matter if they
> wrote it or how deep it is. After a period of time, th
On Jan 24, 2008 10:41 AM, Jason Grout <[EMAIL PROTECTED]> wrote:
>
> Robert Bradshaw wrote:
> > I think the best way to handle deprecation is to throw an error when
> > the (now invalid) command/options are being used. This way any users
> > of the code will know exactly what the problem is, no ma
On Jan 24, 2008 9:24 AM, mhampton <[EMAIL PROTECTED]> wrote:
>
> OK I think I have learned a little. The following code seems to flush
> the output properly, and sends it to the current cell.
>
> r.postscript(os.curdir+'/out.ps')
> r.par(ann=0)
> values = [x for x in srange(0,float(pi),.1)]
> r.p
Hi,
A long time ago I noticed a comment in the prod function about doing a
divide-and-conquer product scheme so as to take advantage of asymptotically
fast
multiplication. Ironically, at the time I thought it was a pretty esoteric
idea
which would only be useful in bizarre cases. But, I've
On Jan 24, 2008 12:03 PM, Joel B. Mohler <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> A long time ago I noticed a comment in the prod function about doing a
> divide-and-conquer product scheme so as to take advantage of asymptotically
> fast
> multiplication. Ironically, at the time I thought it was a
On Jan 24, 2008, at 11:20 AM, William Stein wrote:
> On Jan 24, 2008 10:41 AM, Jason Grout <[EMAIL PROTECTED]>
> wrote:
>>
>> Robert Bradshaw wrote:
>>> I think the best way to handle deprecation is to throw an error when
>>> the (now invalid) command/options are being used. This way any users
On Jan 23, 2008, at 2:04 PM, mabshoff wrote:
>
>
>
>>> Thank you! It did solve it, jmol works now. The notebook doesn't,
>>> but
>>> i understood this will be solved in another alpha-version.
>>
>>> In sage-2.10, that i obtained without installing java-1_4_2-caco-
>>> devel, ldapjdk and ldapj
So perhaps the solution to your problem is the extended integers (or
extended rationals). This needs some work (both in terms of speed and with
having multiple types for elements of the same parent), but it does have the
benefit of returning 1 as the answer to 1 + 0/infinity. Perhaps the default
On Jan 24, 2008 9:06 AM, David Joyner <[EMAIL PROTECTED]> wrote:
>
> (This was posted to the SIGSAM list. Posted here FYI.)
>
> 2008 CALL FOR NOMINATIONS
>
> ACM/SIGSAM Richard D. Jenks Memorial Prize
> for Excellence in Computer Algebra Software Engineering
>
> The third Richard D. Jenks Memorial
Did you do that on a linux machine, or on OS X with X11 running?
Because it seemed to me that the r.png device required X11.
On Jan 24, 1:38 pm, "William Stein" <[EMAIL PROTECTED]> wrote:
> On Jan 24, 2008 9:24 AM, mhampton <[EMAIL PROTECTED]> wrote:
>
>
>
> > OK I think I have learned a little.
Hi,
This is a follow on to yesterdays thread about computing
multiplicative partitions of integers...
Today, a co-worker and myself found a (non-obvious) fast algorithm for
doing this. Suprisingly, the tree based methods we began to discuss
yesterday turned out to be quite slow as you end up fi
On Thu, 24 Jan 2008, Brian Granger wrote:
>
> Hi,
>
> This is a follow on to yesterdays thread about computing
> multiplicative partitions of integers...
>
> Question: where would we begin looking to see if this algorithm is
> known already?
Let a(m,n) be the number of multiplicative partit
> > Question: where would we begin looking to see if this algorithm is
> > known already?
>
>
> Let a(m,n) be the number of multiplicative partitions of integers into m
> parts.
>
> For m fixed, compute a(m,n) for n = 3,4,5... and search for this sequence in
> Sloane's encyclopedia.
>
> And, le
Interesting, but sorry, I don't know the answer to your question about the
primes. I'm cc'ing sage-devel since you mentioned SAGE
and it's implementation of modular forms of weight one.
I'm sure someone there can address that better than I.
>Date: Thu, 24 Jan 2008 18:33:11 -0500
>From: "Hurt,
On Jan 24, 2008 3:32 PM, Brian Granger <[EMAIL PROTECTED]> wrote:
>
> > > Question: where would we begin looking to see if this algorithm is
> > > known already?
> >
> >
> > Let a(m,n) be the number of multiplicative partitions of integers into m
> > parts.
> >
> > For m fixed, compute a(m,n) fo
> I think Tom just meant the above as a hint to answer the question
> "where would we begin looking to see if this algorithm is known already?"
> Sloane's tables of integer sequences:
> http://www.research.att.com/~njas/sequences/
> contain a _lot_ of references to the literature and research.
I'd like to get some pretty output for the command:
sage: [[show(m), m.rank()] for m in MatrixSpace(GF(2),2)]
(i.e., I'd like to actually see what the matrices are when I print the
list). Unfortunately, it seems like the show(m) commands print out the
latex code (which is then very pretty usi
On the public sage notebook server, when I'm in a worksheet and click
"Revisions" and then click on a revision, I get an error:
Internal Server Error
An error occurred rendering the requested page. More information is
available in the server log.
Am I doing something wrong?
Jason
--~--~
On Jan 24, 2008 5:50 PM, Jason Grout <[EMAIL PROTECTED]> wrote:
>
> On the public sage notebook server, when I'm in a worksheet and click
> "Revisions" and then click on a revision, I get an error:
>
> Internal Server Error
> An error occurred rendering the requested page. More information is
> av
On Jan 24, 2008 4:45 PM, William Stein <[EMAIL PROTECTED]> wrote:
>
> On Jan 24, 2008 9:06 AM, David Joyner <[EMAIL PROTECTED]> wrote:
> >
> > (This was posted to the SIGSAM list. Posted here FYI.)
> >
> > 2008 CALL FOR NOMINATIONS
> >
> > ACM/SIGSAM Richard D. Jenks Memorial Prize
> > for Excelle
Following up on William's tip to look at the displayhook function, here
is a function that will enable "pretty-printing" by default in the notebook:
def pretty_print (object):
if object is None:
return
import __builtin__
__builtin__._=object
try:
print html(
On Jan 24, 2008 9:43 PM, Jason Grout <[EMAIL PROTECTED]> wrote:
>
> Following up on William's tip to look at the displayhook function, here
> is a function that will enable "pretty-printing" by default in the notebook:
>
> def pretty_print (object):
> if object is None:
> return
>
William Stein wrote:
> On Jan 24, 2008 9:43 PM, Jason Grout <[EMAIL PROTECTED]> wrote:
>> Following up on William's tip to look at the displayhook function, here
>> is a function that will enable "pretty-printing" by default in the notebook:
>>
>> def pretty_print (object):
>> if object is No
48 matches
Mail list logo