On 2018-10-09 12:00, Dima Pasechnik wrote:
Well, primitive, as opposed to added by Sage. E.g. I suppose one cannot use it
for RDF.
If you really want to get elements of RDF, you could use a Sage vector
instead.
--
You received this message because you are subscribed to the Google Groups
"s
On Tue, Oct 9, 2018 at 10:45 AM Jeroen Demeyer wrote:
>
> On 2018-10-08 14:28, Dima Pasechnik wrote:
> > Can you use array.array on anything that's not a primitive Python type?
>
> I don't know what you mean with "primitive Python type". Anyway, it
> supports various kinds of basic C types (like d
On 2018-10-08 14:28, Dima Pasechnik wrote:
Can you use array.array on anything that's not a primitive Python type?
I don't know what you mean with "primitive Python type". Anyway, it
supports various kinds of basic C types (like double for example). Docs
here:
https://docs.python.org/2/libr
On Mon, Oct 8, 2018 at 1:07 PM Jeroen Demeyer wrote:
>
> On 2018-10-08 13:19, Thierry Dumont wrote:
> > So my list should use less than 1gb, if it phi was a C array.
>
> But it's not a C array. There is overhead for Python garbage collection,
> the Sage parent, the Cython virtual method table...
On 2018-10-08 13:19, Thierry Dumont wrote:
So my list should use less than 1gb, if it phi was a C array.
But it's not a C array. There is overhead for Python garbage collection,
the Sage parent, the Cython virtual method table...
If you really want a C array, use array.array or numpy.
--
Yo
Le 08/10/2018 à 12:56, Dima Pasechnik a écrit :
> On Mon, Oct 8, 2018 at 11:34 AM Thierry Dumont
> wrote:
>>
>> I do:
>>
>> N= 10^8
>> theta= RDF(2*pi/N)
>> phi=[i*theta for i in range(0,N)]
>>
>> not something sophisticated...!
>>
>> Also: it is not a good idea do do that: better use numpy. BUT
>
On Mon, Oct 8, 2018 at 11:34 AM Thierry Dumont
wrote:
>
> I do:
>
> N= 10^8
> theta= RDF(2*pi/N)
> phi=[i*theta for i in range(0,N)]
>
> not something sophisticated...!
>
> Also: it is not a good idea do do that: better use numpy. BUT
>
> looking at "top" during the computation of
> phi=[i*theta f
I do:
N= 10^8
theta= RDF(2*pi/N)
phi=[i*theta for i in range(0,N)]
not something sophisticated...!
Also: it is not a good idea do do that: better use numpy. BUT
looking at "top" during the computation of
phi=[i*theta for i in range(0,N)],
the memory used jumps to 3Gb and then grows, grows... un