With the new np.partition functionality, there is a more efficient, but
also less obvious, way of extracting the n largest (or smallest) elements
from an array, i.e.:
def smallest_n(a, n):
return np.sort(np.partition(a, n)[:n])
def argsmallest_n(a, n):
ret = np.argpartition(a, n)[:n]
On 12.12.2013 20:40, David Jones wrote:
> On 12/12/13 15:54, Julian Taylor wrote:
>> On 12.12.2013 19:58, David Jones wrote:
>>> I'm trying to compile 32-bit numpy on a 64 bit Centos 6 system, but fails
>>> with the message:
>>>
>>> "Broken toolchain: cannot link a simple C program"
>>>
...
>>>
>>
On 12/12/13 15:54, Julian Taylor wrote:
> On 12.12.2013 19:58, David Jones wrote:
>> I'm trying to compile 32-bit numpy on a 64 bit Centos 6 system, but fails
>> with the message:
>>
>> "Broken toolchain: cannot link a simple C program"
>>
>> It get's the compile flags right, but not the linker:
>
On 12.12.2013 19:58, David Jones wrote:
> I'm trying to compile 32-bit numpy on a 64 bit Centos 6 system, but fails
> with the message:
>
> "Broken toolchain: cannot link a simple C program"
>
> It get's the compile flags right, but not the linker:
>
> C compiler: gcc -pthread -fno-strict-alias
I'm trying to compile 32-bit numpy on a 64 bit Centos 6 system, but fails with
the message:
"Broken toolchain: cannot link a simple C program"
It get's the compile flags right, but not the linker:
C compiler: gcc -pthread -fno-strict-aliasing -g -O2 -m32 -DNDEBUG -g -fwrapv
-O3 -Wall -Wstrict-
Hello,
In order to repeat rows or columns of an array as
http://stackoverflow.com/questions/1550130/cloning-row-or-column-vectors
I can use np.repeat as suggested by pv. However, looking at the flags of
the resulting array, data seems to be copied and actually repeated in
memory. This is not appli