On Thu, May 20, 2010 at 7:38 PM, Robert Kern wrote:
> On Thu, May 20, 2010 at 21:21, Keith Goodman wrote:
>> I'd like to include modified numpy doc strings in my package. Do I
>> just put a note in my license file that says my package contains numpy
>> doc strings and then paste in the numpy lice
On Thu, May 20, 2010 at 7:36 PM, wrote:
> On Thu, May 20, 2010 at 9:00 PM, Keith Goodman wrote:
>> While automating some unit tests for my labeled array class, larry, I
>> assumed that
>>
>> np.array([1, 2], dtype=dtype)
>>
>> would give the same result as
>>
>> np.array([1, 2]).astype(dtype)
>>
On Thu, May 20, 2010 at 21:21, Keith Goodman wrote:
> I'd like to include modified numpy doc strings in my package. Do I
> just put a note in my license file that says my package contains numpy
> doc strings and then paste in the numpy license? My package is
> distributed under a Simplifed BSD lic
On Thu, May 20, 2010 at 9:00 PM, Keith Goodman wrote:
> While automating some unit tests for my labeled array class, larry, I
> assumed that
>
> np.array([1, 2], dtype=dtype)
>
> would give the same result as
>
> np.array([1, 2]).astype(dtype)
>
> But it doesn't for dtype=None:
>
>>> np.array([1,
I'd like to include modified numpy doc strings in my package. Do I
just put a note in my license file that says my package contains numpy
doc strings and then paste in the numpy license? My package is
distributed under a Simplifed BSD license, if that matters.
__
While automating some unit tests for my labeled array class, larry, I
assumed that
np.array([1, 2], dtype=dtype)
would give the same result as
np.array([1, 2]).astype(dtype)
But it doesn't for dtype=None:
>> np.array([1, 2, 3], dtype=None)
array([1, 2, 3])
>> np.array([1, 2, 3]).astype(None
Hi
Thanks for all your help!
I found the "strange" result was caused by my algorithm(CUDA).
The swig part is very ok:)
On Thu, May 20, 2010 at 11:18 PM, Bill Spotz wrote:
> I tried the following:
>
> %module example
> %{
> #define SWIG_FILE_WITH_INIT
> //#include "example.h"
> %}
> %include
Thu, 20 May 2010 13:04:11 -0700, Keith Goodman wrote:
> Why do the follow expressions give different dtype?
>
>>> np.array([1, 2, 3], dtype=str)
> array(['1', '2', '3'],
> dtype='|S1')
>>> np.array(np.array([1, 2, 3]), dtype=str)
> array(['1', '2', '3'],
> dtype='|S8')
Scalars seem to
On Thu, May 20, 2010 at 4:28 PM, Keith Goodman wrote:
> On Thu, May 20, 2010 at 1:19 PM, wrote:
>> On Thu, May 20, 2010 at 4:04 PM, Keith Goodman wrote:
>>> Why do the follow expressions give different dtype?
>>>
> np.array([1, 2, 3], dtype=str)
>>> array(['1', '2', '3'],
>>> dtype='|S
On Thu, May 20, 2010 at 1:19 PM, wrote:
> On Thu, May 20, 2010 at 4:04 PM, Keith Goodman wrote:
>> Why do the follow expressions give different dtype?
>>
np.array([1, 2, 3], dtype=str)
>> array(['1', '2', '3'],
>> dtype='|S1')
np.array(np.array([1, 2, 3]), dtype=str)
>> array(['1'
On Thu, May 20, 2010 at 4:19 PM, wrote:
> On Thu, May 20, 2010 at 4:04 PM, Keith Goodman wrote:
>> Why do the follow expressions give different dtype?
>>
np.array([1, 2, 3], dtype=str)
>> array(['1', '2', '3'],
>> dtype='|S1')
np.array(np.array([1, 2, 3]), dtype=str)
>> array(['1'
On Thu, May 20, 2010 at 4:04 PM, Keith Goodman wrote:
> Why do the follow expressions give different dtype?
>
>>> np.array([1, 2, 3], dtype=str)
> array(['1', '2', '3'],
> dtype='|S1')
>>> np.array(np.array([1, 2, 3]), dtype=str)
> array(['1', '2', '3'],
> dtype='|S8')
you're on a 64bit
Why do the follow expressions give different dtype?
>> np.array([1, 2, 3], dtype=str)
array(['1', '2', '3'],
dtype='|S1')
>> np.array(np.array([1, 2, 3]), dtype=str)
array(['1', '2', '3'],
dtype='|S8')
___
NumPy-Discussion mailing list
NumPy-
On Thu, May 20, 2010 at 12:07 PM, Bruce Southey wrote:
> np.array is an array creating function that numpy.array takes a
> array_like input and it *will* try to convert that input into an array.
> (This also occurs when you give np.array a masked array as an input.)
> This a 'feature' especially w
On Thu, May 20, 2010 at 12:13 PM, Benjamin Root wrote:
>
>
> On Thu, May 20, 2010 at 10:30 AM, Ryan May wrote:
>>
>> On Thu, May 20, 2010 at 9:44 AM, Benjamin Root wrote:
>> >> I gave two counterexamples of why.
>> >
>> > The examples you gave aren't counterexamples. See below...
>> >
>> > On W
On Thu, May 20, 2010 at 10:30 AM, Ryan May wrote:
> On Thu, May 20, 2010 at 9:44 AM, Benjamin Root wrote:
> >> I gave two counterexamples of why.
> >
> > The examples you gave aren't counterexamples. See below...
> >
> > On Wed, May 19, 2010 at 7:06 PM, Darren Dale wrote:
> >>
> >> On Wed, May
On 05/20/2010 10:53 AM, Darren Dale wrote:
> [sorry, my last got cut off]
>
> On Thu, May 20, 2010 at 11:37 AM, Darren Dale wrote:
>
>> On Thu, May 20, 2010 at 10:44 AM, Benjamin Root wrote:
>>
I gave two counterexamples of why.
>>> The examples you gave aren't count
[sorry, my last got cut off]
On Thu, May 20, 2010 at 11:37 AM, Darren Dale wrote:
> On Thu, May 20, 2010 at 10:44 AM, Benjamin Root wrote:
>>> I gave two counterexamples of why.
>>
>> The examples you gave aren't counterexamples. See below...
>
> I'm not interested in arguing over semantics. I'
I tried the following:
%module example
%{
#define SWIG_FILE_WITH_INIT
//#include "example.h"
%}
%include "numpy.i"
%init %{
import_array();
%}
%apply (float* INPLACE_ARRAY1, int DIM1) {(float *a, int na), (float
*b, int nb)};
%inline
{
void update_incident_field(int k, float *a, int n
On Thu, May 20, 2010 at 10:44 AM, Benjamin Root wrote:
>> I gave two counterexamples of why.
>
> The examples you gave aren't counterexamples. See below...
I'm not interested in arguing over semantics. I've discovered an issue
with how numpy deals with lists of objects that derive from ndarray,
On Thu, May 20, 2010 at 9:44 AM, Benjamin Root wrote:
>> I gave two counterexamples of why.
>
> The examples you gave aren't counterexamples. See below...
>
> On Wed, May 19, 2010 at 7:06 PM, Darren Dale wrote:
>>
>> On Wed, May 19, 2010 at 4:19 PM, wrote:
>> > On Wed, May 19, 2010 at 4:08 PM,
>
> I gave two counterexamples of why.
>
The examples you gave aren't counterexamples. See below...
On Wed, May 19, 2010 at 7:06 PM, Darren Dale wrote:
> On Wed, May 19, 2010 at 4:19 PM, wrote:
> > On Wed, May 19, 2010 at 4:08 PM, Darren Dale wrote:
> >> I have a question about creation of
On Thu, May 20, 2010 at 10:17 AM, David Goldsmith
wrote:
> On Wed, May 19, 2010 at 3:50 PM, William Carithers wrote:
>
>> Hi David and Josef,
>>
>> OK, I updated to numpy-1.4.1 and scipy-0.7.2 and this problem went away.
>> Thanks for your help.
>>
>> BTW, trying to upgrade using the .dmg files fr
Hi,
I don't know exactly, but try replacing the one line
%apply (float* INPLACE_ARRAY1, int DIM1) {(float *a, int na), (float
*b, int nb)};
with two lines:
%apply (float* INPLACE_ARRAY1, int DIM1) {(float *a, int na)};
%apply (float* INPLACE_ARRAY1, int DIM1) {(float *b, int nb)};
Don't know abo
24 matches
Mail list logo