On 19-Mar-10, at 1:13 PM, Anne Archibald wrote:
> I'm not knocking numpy; it does (almost) the best it can. (I'm not
> sure of the optimality of the order in which ufuncs are executed; I
> think some optimizations there are possible.) But a language designed
> from scratch for vector calculations
Anne Archibald wrote:
> (Which, honestly, makes me wonder what the point is of
> building multicore machines.)
Advertising...
Oh, and having multiple cores slows down multi-threading in Python, so
that feature is worth the expense!
> But a language designed
> from scratch for vector calculation
On Mar 18, 2010, at 4:12 PM, Eric Firing wrote:
> Ryan May wrote:
>> On Thu, Mar 18, 2010 at 2:46 PM, Christopher Barker
>> wrote:
>>> Gael Varoquaux wrote:
On Thu, Mar 18, 2010 at 12:12:10PM -0700, Christopher Barker wrote:
> sure -- that's kind of my point -- if EVERY numpy array were
>
On 18 March 2010 13:53, Francesc Alted wrote:
> A Thursday 18 March 2010 16:26:09 Anne Archibald escrigué:
>> Speak for your own CPUs :).
>>
>> But seriously, congratulations on the wide publication of the article;
>> it's an important issue we often don't think enough about. I'm just a
>> little
On 3/18/2010 4:56 AM, Sebastian Haase wrote:
> How would people feel about unifying the function vs. the method behavior ?
> One could add an addition option like
> `repeat` or `fillZero`.
> One could (at first !?) keep opposite defaults to not change the
> current behavior.
> But this way it would
On 3/19/2010 10:53 AM, gerardob wrote:
> I would like to know a simple way to generate a list containing all the
> lists having two 1's at each element.
>
> Example, n = 4
> L2 = [[1,1,0,0],[1,0,1,0],[1,0,0,1],[0,1,1,0],[0,1,0,1],[0,0,1,1]]
>
I like
list(set(itertools.permutations([1,1]+[0]*(n-2)
On Fri, Mar 19, 2010 at 11:24 AM, wrote:
> On Fri, Mar 19, 2010 at 11:17 AM, Keith Goodman wrote:
>> On Fri, Mar 19, 2010 at 7:53 AM, gerardob wrote:
>>>
>>> Hello, i would like to produce lists of lists 1's and 0's.
>>>
>>> For example, to produce the list composed of:
>>>
>>> L = [[1,0,0,0],[
On Fri, Mar 19, 2010 at 11:17 AM, Keith Goodman wrote:
> On Fri, Mar 19, 2010 at 7:53 AM, gerardob wrote:
>>
>> Hello, i would like to produce lists of lists 1's and 0's.
>>
>> For example, to produce the list composed of:
>>
>> L = [[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]]
>>
>> I just need to d
On Fri, Mar 19, 2010 at 10:17 AM, Joe Kington wrote:
> See itertools.permutations (python standard library)
>
> e.g.
> In [3]: list(itertools.permutations([1,1,0,0]))
> Out[3]:
> [(1, 1, 0, 0),
> (1, 1, 0, 0),
> (1, 0, 1, 0),
> (1, 0, 0, 1),
> (1, 0, 1, 0),
> (1, 0, 0, 1),
> (1, 1, 0, 0),
>
I just realized that permutations isn't quite what you want, as swapping the
first "1" for the second "1" gives the same thing. You can use set to get
the unique permutations.
e.g.
In [4]: set(itertools.permutations([1,1,0,0]))
Out[4]:
set([(0, 0, 1, 1),
(0, 1, 0, 1),
(0, 1, 1, 0),
On Fri, Mar 19, 2010 at 8:17 AM, Joe Kington wrote:
> See itertools.permutations (python standard library)
> e.g.
> In [3]: list(itertools.permutations([1,1,0,0]))
> Out[3]:
> [(1, 1, 0, 0),
> (1, 1, 0, 0),
> (1, 0, 1, 0),
> (1, 0, 0, 1),
> (1, 0, 1, 0),
> (1, 0, 0, 1),
> (1, 1, 0, 0),
> (1
On Fri, Mar 19, 2010 at 7:53 AM, gerardob wrote:
>
> Hello, i would like to produce lists of lists 1's and 0's.
>
> For example, to produce the list composed of:
>
> L = [[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]]
>
> I just need to do the following:
>
> n=4
> numpy.eye(n,dtype=int).tolist()
>
> I w
See itertools.permutations (python standard library)
e.g.
In [3]: list(itertools.permutations([1,1,0,0]))
Out[3]:
[(1, 1, 0, 0),
(1, 1, 0, 0),
(1, 0, 1, 0),
(1, 0, 0, 1),
(1, 0, 1, 0),
(1, 0, 0, 1),
(1, 1, 0, 0),
(1, 1, 0, 0),
(1, 0, 1, 0),
(1, 0, 0, 1),
(1, 0, 1, 0),
(1, 0, 0, 1),
(0,
Hello, i would like to produce lists of lists 1's and 0's.
For example, to produce the list composed of:
L = [[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]]
I just need to do the following:
n=4
numpy.eye(n,dtype=int).tolist()
I would like to know a simple way to generate a list containing all the
l
On Wed, Mar 17, 2010 at 10:16 PM, Charles R Harris
wrote:
> On Wed, Mar 17, 2010 at 7:39 PM, Darren Dale wrote:
>> On Wed, Mar 17, 2010 at 8:22 PM, Charles R Harris
>> > What bothers me here is the opposing desire to separate ufuncs from
>> > their
>> > ndarray dependency, having them operate on
On Thu, Mar 18, 2010 at 7:01 AM, Frank Horowitz wrote:
> Dear All,
>
> I'm working on a piece of optimisation code where it turns out to be
> mathematically convenient to have a matrix where a few pre-chosen elements
> must be computed at evaluation time for the dot product (i.e. matrix
> multi
> >>>
> class X:
>
> ... def __mul__(self, other):
> ... return numpy.random.random() * other
> ... def __rmul__(self, other):
> ... return other * numpy.random.random()
Thanks for that Friedrich!
I had forgotten about __mul__, __rmul__, __float__ et al. I th
17 matches
Mail list logo