an-00'"
In [10]: str(d[1]).lstrip('b')[0] In [11]: str(d[1]).lstrip('b')[0]
Out[10]: '0' Out[11]: "'"
I want to have extra double quotes I want to delete the double quotes
enclosing the string stored in d[1] enclosing the string stored in d
This is the closer I got to do what you say
http://numpy-discussion.10968.n7.nabble.com/Reductions-with-nditer-working-only-with-the-last-axis-td8157.html
Converts a 3D to 2D, but only works in the last axis. Any improvement would
be welcomed.ç
2013/3/22 Neal Becker
> I frequently find I ha
nguages (possibly following C)
would do and, most important, dealing with integers, one expects overflows and
wraparounds, not certainly a loss of precision.
Another issue is that the promotion rule breaks indexing
a = np.uint64(1)
b=[0,1,2,3,4,5]
b[a] -> 1 # OK
b[a+1] -> Error
I rea
Hi,
I have noticed that numpy introduces some unexpected type casts, that are
in some cases problematic.
A very weird cast is
int + uint64 -> float
for instance, consider the following snippet:
import numpy as np
a=np.uint64(1)
a+1
-> 2.0
this cast is quite different from what other program
Partially fixed.
I was messing the row, column order. For some reason this was working in some
case. Now I've fixed it and it *always* works.
However, it is still slower than the cblas
cblas -> 0.69 sec
scipy blas -> 0.74 sec
Any clue why?
___
Num
... and it is not deterministic too...
About 1 time over 6 the code calling the scipy blas gives a completely wrong
result. How can this be?
___
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discus
Hi,
following the excellent advice of V. Armando Sole, I have finally succeeded in
calling the blas routines shipped with scipy from cython.
I am doing this to avoid shipping an extra blas library for some project of
mine that uses scipy but has some things coded in cython for extra speed.
So fa
>
> from scipy.linalg.blas import fblas
> dgemm = fblas.dgemm._cpointer
> sgemm = fblas.sgemm._cpointer
>
OK, but this gives me a PyCObject. How do I make it a function pointer of the
correct type in cython?
Thanks again
Sergio
___
N
V. Armando Solé esrf.fr> writes:
> from scipy.linalg.blas import fblas
> dgemm = fblas.dgemm._cpointer
> sgemm = fblas.sgemm._cpointer
>
I'm going to try and benchmark it asap.
Thanks
___
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
h
Dag Sverre Seljebotn astro.uio.no> writes:
>
> On 02/18/2013 05:26 PM, rif wrote:
> > I have no answer to the question, but I was curious as to why directly
> > calling the cblas would be 10x-20x slower in the first place. That
> > seems surprising, although I'm just learning about python numer
Hi,
I have a project that includes a cython script which in turn does some direct
access to a couple of cblas functions. This is necessary, since some matrix
multiplications need to be done inside a tight loop that gets called thousands
of times. Speedup wrt calling scipy.linalg.blas.cblas routine
42 45]
[48 51 54 57]]
nditer_fun(data, [-1, 0, 1])
[[58 58 58 58]
[58 58 58 58]
[58 58 58 58]]
Only along the last axis both functions give the same result
2012/10/1 Han Genuit :
> On Thu, Sep 27, 2012 at 6:08 PM, Sergio Pascual
> wrote:
>> Hello, I'm trying to understand h
nd giving an array of length 2 each time. I have
read the numpy documentation several times and googled about this to
no avail.
Does anybody have an example of a reduction in the first axis of an
array using nditer? Is this a bug?
Regards, Sergio
___
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion
rsion using NpyIter. The only way I
found to do the innermost loop over the third axis was passing the
flag NPY_ITER_MULTI_INDEX, but then I can't use NPY_ITER_BUFFERED to
handle my bitswapped, at least in numpy 1.6 they couldn't be used
simultaneously.
Any hint on how I can do this?
, what is the rationale to have the limit in 32 instead of, say, 1024?
If this number cannot easily be increased in the source code, what is
the alternative to iterate over a large number of images? Could it be
an array of NpyIter objects?
Regards, Sergio
You should check if you have two different compilers installed
ls /usr/bin/gcc* ?
2011/4/13 c cook :
> I have Fedora Core 3 and x86_64 architecture. But I don't understand why it
> appears to look for /usr/lib/gcc/x86_64-redhat-linux/3.4.4/
> instead of /usr/bin/gcc
> Csaba
>
> On Wed, Apr 13, 20
1, 2011 at 2:36 PM, Sergio Pascual
> wrote:
>> Hi list.
>>
>> For mi application, I would like to implement some new statistics
>> functions over numpy arrays, such as truncated mean. Ideally this new
>> function should have the same arguments
>> than numpy.
in C from scratch?
I have read the documentation, but as far a I see ufuncs convert a N
dimensional array into another and generalized ufuncs require fixed
dimensions. numpy mean converts a N dimensional array either in a
number or a N - 1 dimensional array.
Regards, S
18 matches
Mail list logo