Re: [Numpy-discussion] [EXTERNAL] Fwd: numpy.i and std::complex

2014-10-27 Thread Bill Spotz
whether list subscribers think this is worthwhile and ask someone to add+push it for me … Thanks, Glen Mabey ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion ** Bill Spotz

Re: [Numpy-discussion] [EXTERNAL] Re: numpy.i and std::complex

2014-10-27 Thread Bill Spotz
___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion ** Bill Spotz ** ** Sandia National Laboratories Voice: (505)845-0170 ** ** P.O. Box

Re: [Numpy-discussion] [EXTERNAL] Re: numpy.i and std::complex

2014-10-27 Thread Bill Spotz
Oops, I meant 'Cython is its own language,' not Python (although Python qualifies, too, just not in context). Also, Pyrex, listed in the c-info.python-as-glue.html page, was the pre-cursor to Cython. -Bill On Oct 27, 2014, at 10:20 AM, Bill Spotz wfsp...@sandia.gov wrote: Python is its own

Re: [Numpy-discussion] [EXTERNAL] numpy.i and INPLACE_ARRAY1[ANY]

2013-11-22 Thread Bill Spotz
a dimension? Thanks for any help, Kaspar ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion ** Bill Spotz ** ** Sandia National

Re: [Numpy-discussion] [EXTERNAL] numpy.i and INPLACE_ARRAY1[ANY]

2013-11-22 Thread Bill Spotz
* data_location, int unused)} But it doesn’t seem to do anything an I just get a TypeError. You might have noticed I am a little bit out of my depth… Ta, Kaspar On 22 November 2013 22:40, Bill Spotz wfsp...@sandia.gov wrote: Kaspar, Yes, in order for numpy.i typemaps to work, you need

Re: [Numpy-discussion] [EXTERNAL] numpy.i and INPLACE_ARRAY1[ANY]

2013-11-22 Thread Bill Spotz
function. The only point where the check could be made would be in the run function which should not be run with a value longer than the array length. On 22 November 2013 23:19, Bill Spotz wfsp...@sandia.gov wrote: I think you are getting close. Application of the typemap simply

Re: [Numpy-discussion] [EXTERNAL] segv PyArray_Check

2013-11-14 Thread Bill Spotz
/listinfo/numpy-discussion ** Bill Spotz ** ** Sandia National Laboratories Voice: (505)845-0170 ** ** P.O. Box 5800 Fax: (505)284-0154 ** ** Albuquerque, NM 87185-0370Email: wfsp...@sandia.gov

[Numpy-discussion] Request code review of numpy.i changes

2013-03-11 Thread Bill Spotz
https://github.com/wfspotz/numpy/compare/numpy-swig ** Bill Spotz ** ** Sandia National Laboratories Voice: (505)845-0170 ** ** P.O. Box 5800 Fax: (505)284-0154 ** ** Albuquerque, NM 87185-0370Email: wfsp...@sandia.gov

Re: [Numpy-discussion] [EXTERNAL] swig interface file (numpy.i) warning

2013-02-27 Thread Bill Spotz
Is there documentation for the new C API for numpy? Thanks, Bill On Feb 26, 2013, at 2:04 PM, Bill Spotz wrote: So the difference is that I was wanting to make changes in the git repository that is at version 1.8. I would expect it to still work, though. I can take a look at the scipy

Re: [Numpy-discussion] [EXTERNAL] swig interface file (numpy.i) warning

2013-02-26 Thread Bill Spotz
So the difference is that I was wanting to make changes in the git repository that is at version 1.8. I would expect it to still work, though. I can take a look at the scipy issue. -Bill On Feb 26, 2013, at 1:41 PM, Ralf Gommers wrote: On Mon, Feb 25, 2013 at 6:12 AM, Bill Spotz wfsp

Re: [Numpy-discussion] [EXTERNAL] swig interface file (numpy.i) warning

2013-02-24 Thread Bill Spotz
the same issue. I'll post something here when I can get to it. - Tom On Tue, Oct 9, 2012 at 10:52 AM, Bill Spotz wfsp...@sandia.gov wrote: Tom, Charles, If you discuss this further, be sure to CC me. -Bill Spotz On Oct 9, 2012, at 8:50 AM, Charles R Harris wrote: Hi Tom, On Tue

Re: [Numpy-discussion] [EXTERNAL] swig interface file (numpy.i) warning

2012-10-09 Thread Bill Spotz
Tom, Charles, If you discuss this further, be sure to CC me. -Bill Spotz On Oct 9, 2012, at 8:50 AM, Charles R Harris wrote: Hi Tom, On Tue, Oct 9, 2012 at 8:30 AM, Tom Krauss thomas.p.kra...@gmail.com wrote: Hi, I've been happy to use numpy.i for generating SWIG interfaces to C

Re: [Numpy-discussion] [EXTERNAL] Question Regarding numpy.i and 2-dimensional input array

2012-09-04 Thread Bill Spotz
___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion ** Bill Spotz ** ** Sandia National Laboratories Voice: (505)845-0170 ** ** P.O. Box 5800

Re: [Numpy-discussion] [EXTERNAL] Re: SWIG Numpy and C++ extensions

2012-07-31 Thread Bill Spotz
length: %i\n,j,nparray-dimensions[j]); } } ** Bill Spotz ** ** Sandia National Laboratories Voice: (505)845-0170 ** ** P.O. Box 5800 Fax: (505)284-0154 ** ** Albuquerque, NM 87185-0370Email: wfsp...@sandia.gov

Re: [Numpy-discussion] [EXTERNAL] swig + numpy + variable length arrays

2012-07-16 Thread Bill Spotz
-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion ** Bill Spotz ** ** Sandia National Laboratories Voice: (505)845-0170 ** ** P.O. Box 5800 Fax: (505)284-0154 ** ** Albuquerque, NM 87185-0370

Re: [Numpy-discussion] [EXTERNAL] Numpy + SWIG

2012-06-04 Thread Bill Spotz
it as necessary. -gideon ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion ** Bill Spotz ** ** Sandia National Laboratories Voice

Re: [Numpy-discussion] [EXTERNAL] creating/working NumPy-ndarrays in C++

2012-04-03 Thread Bill Spotz
___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion ** Bill Spotz ** ** Sandia National Laboratories Voice: (505)845-0170 ** ** P.O. Box 5800

Re: [Numpy-discussion] [EXTERNAL] Re: Strange PyArray_FromObject() behavior

2012-02-17 Thread Bill Spotz
Chuck, I provided a little more context in another email. The user is using numpy 1.6.1 with python 2.6. I asked him to try an earlier version -- we'll see how it goes. This is code that has worked for a long time. It still works on my laptop and on our test platforms. The behavior on the

Re: [Numpy-discussion] [EXTERNAL] Re: Strange PyArray_FromObject() behavior

2012-02-16 Thread Bill Spotz
=timedelta64[us]) I am stuck as to why this might be happening. Any ideas? Thanks ** Bill Spotz ** ** Sandia National Laboratories Voice: (505)845-0170 ** ** P.O. Box 5800 Fax: (505)284-0154 ** ** Albuquerque, NM

Re: [Numpy-discussion] Where can I download numpy.i?

2011-02-26 Thread Bill Spotz
When you download numpy, it should be in doc/swig/numpy.i On Feb 26, 2011, at 6:15 PM, Brandt Belson wrote: I just want to know exactly how to get the file numpy.i (for SWIG), I've come across links that seem to take me nowhere. Thank you. ** Bill Spotz

Re: [Numpy-discussion] cython/swigpyrex examples and docs

2010-07-31 Thread Bill Spotz
. ** Bill Spotz ** ** Sandia National Laboratories Voice: (505)845-0170 ** ** P.O. Box 5800 Fax: (505)284-0154 ** ** Albuquerque, NM 87185-0370Email: wfsp...@sandia.gov

Re: [Numpy-discussion] Problem in swig

2010-05-20 Thread Bill Spotz
** Bill Spotz ** ** Sandia National Laboratories Voice: (505)845-0170 ** ** P.O. Box 5800 Fax: (505)284-0154 ** ** Albuquerque, NM 87185-0370Email: wfsp...@sandia.gov

Re: [Numpy-discussion] ndimage.label - howto force SWIG to use int32 - even on 64bit Linux ?

2010-04-28 Thread Bill Spotz
. Now, if I use the typemaps of numpy.i I can choose between NPY_LONG and NPY_INT. But those are sometimes 32 sometimes 64 bit, depending on the system. Any ideas ... ? npy_intp. Chuck ** Bill Spotz ** ** Sandia National Laboratories Voice

Re: [Numpy-discussion] Numpy+SWIG with arrays in input and output of a function

2010-04-15 Thread Bill Spotz
gratuit, fiable et complet Profitez-en ATT2.txt ** Bill Spotz ** ** Sandia National Laboratories Voice: (505)845-0170 ** ** P.O. Box 5800 Fax: (505)284-0154 ** ** Albuquerque, NM 87185-0370Email: wfsp...@sandia.gov

Re: [Numpy-discussion] Numpi array and typemap

2010-03-15 Thread Bill Spotz
... } }; %template(cN) Containersize_t; %typemap(python,out) Containersize_t { npy_intp dims[] = { 5 }; PyObject* obj = PyArray_SimpleNewFromData (1,dims,PyArray_UINT, $1.ptr()); $result = obj; } template class T navlib::arrayT getContainer(); %template(getContainerN ) getContainersize_t; ** Bill Spotz

Re: [Numpy-discussion] numpy.i

2010-01-26 Thread Bill Spotz
is complaining. thanks, ross ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion ** Bill Spotz ** ** Sandia National Laboratories Voice: (505)845

Re: [Numpy-discussion] mixing -fno-exceptions with swig c++ wrappers to python

2009-09-07 Thread Bill Spotz
___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion ** Bill Spotz ** ** Sandia National Laboratories Voice: (505)845-0170 ** ** P.O. Box 5800 Fax: (505)284-0154

Re: [Numpy-discussion] SWIG, numpy.i and errno: comments?

2009-08-10 Thread Bill Spotz
(PyExc_MemoryError, Failed malloc()); break; default: PyErr_Format(PyExc_Exception, Unknown exception); } return NULL; } } If there's a better way of doing this, I'll update the cookbook recipe. Regards, Egor ** Bill Spotz

Re: [Numpy-discussion] SWIG, numpy.i and errno: comments?

2009-08-09 Thread Bill Spotz
(PyExc_Exception, Unknown exception); } return NULL; } } If there's a better way of doing this, I'll update the cookbook recipe. Regards, Egor ** Bill Spotz ** ** Sandia National Laboratories Voice: (505)845-0170

Re: [Numpy-discussion] numpy C++ swig class example

2009-06-10 Thread Bill Spotz
%{ #define SWIG_FILE_WITH_INIT #include Array2D.h %} %include numpy.i %init %{ import_array(); %} %ignore Array2D(); %ignore Array2D(long nrow, long ncol); %apply (int DIM1, int DIM2, double* IN_ARRAY2) {(int nrow, int ncol, double *data)} %include Array2D.h ** Bill Spotz

Re: [Numpy-discussion] SWIG and numpy.i

2009-03-25 Thread Bill Spotz
kevin.francoi...@uclouvain.be On Tue, Mar 24, 2009 at 6:13 PM, Bill Spotz wfsp...@sandia.gov wrote: Kevin, You need to declare vecSum() *after* you %include numpy.i and use the %apply directive. Based on what you have, I think you can just get rid of the extern double vecSum(...). I

Re: [Numpy-discussion] SWIG and numpy.i

2009-03-24 Thread Bill Spotz
? Thank you very much, Kevin ATT2.txt ** Bill Spotz ** ** Sandia National Laboratories Voice: (505)845-0170 ** ** P.O. Box 5800 Fax: (505)284-0154 ** ** Albuquerque, NM 87185-0370Email: wfsp...@sandia.gov

[Numpy-discussion] PY_ARRAY_UNIQUE_SYMBOL

2008-05-21 Thread Bill Spotz
on what I should be looking for? Thanks ** Bill Spotz ** ** Sandia National Laboratories Voice: (505)845-0170 ** ** P.O. Box 5800 Fax: (505)284-0154 ** ** Albuquerque, NM 87185-0370Email: [EMAIL PROTECTED

Re: [Numpy-discussion] PY_ARRAY_UNIQUE_SYMBOL

2008-05-21 Thread Bill Spotz
On May 21, 2008, at 5:15 PM, Robert Kern wrote: On Wed, May 21, 2008 at 3:34 PM, Bill Spotz [EMAIL PROTECTED] wrote: I am running into a problem with a numpy-compatible extension module that I develop, and I believe it has to do with PY_ARRAY_UNIQUE_SYMBOL. I set PY_ARRAY_UNIQUE_SYMBOL

Re: [Numpy-discussion] NumPtr vs NumPy.i to access C

2008-05-17 Thread Bill Spotz
? or does it make a copy of the array to pass it to/from the C function? I'm new to programming and I'd like to make sure of this. I need to use in C very large arrays frequently, so I want to avoid making copies of it, because speed will be an important factor. Thanks in advance! ** Bill

Re: [Numpy-discussion] the path forward

2008-04-30 Thread Bill Spotz
the extracted row/ column with two indexes. Multiplication with the extracted row/column would still work as expected (and that sounded to me like what the application typically was . . . maybe I'm wrong). ** Bill Spotz ** ** Sandia National

Re: [Numpy-discussion] Matrix Class [was numpy release]

2008-04-28 Thread Bill Spotz
On Apr 24, 2008, at 8:52 PM, Bill Spotz wrote: On Apr 24, 2008, at 5:45 PM, Timothy Hochberg wrote: Bill Spotz wrote: I have generally thought about this in the context of, say, a Krylov-space iterative method, and what that type of interface would lead to the most readable code. Can

Re: [Numpy-discussion] Matrix Class [was numpy release]

2008-04-24 Thread Bill Spotz
On Apr 24, 2008, at 5:45 PM, Timothy Hochberg wrote: Bill Spotz wrote: I have generally thought about this in the context of, say, a Krylov-space iterative method, and what that type of interface would lead to the most readable code. Can you whip up a small example, starting

Re: [Numpy-discussion] float32 is not a float ?

2008-04-10 Thread Bill Spotz
argue for returning False, but then the converter might be too zealous things that used to work like: if type(item) in [types.IntType, types.FloatType]: or: isinstance(item, types.FloatType) now fail, should we be concerned? should we consider returning True ? Thanks, C. ** Bill Spotz

Re: [Numpy-discussion] Any multigrid package to recommend ?

2008-04-07 Thread Bill Spotz
to look at. I also built in quite a bit of compatibility with numpy. On Apr 7, 2008, at 8:14 AM, lan haiping wrote: Dear Guys @list : I wanna do some application with mulgrid method for electrostatic problems, is there some python package available for my purpose ? ** Bill Spotz

Re: [Numpy-discussion] documentation for masked arrays?

2008-03-19 Thread Bill Spotz
:-( ** Bill Spotz ** ** Sandia National Laboratories Voice: (505)845-0170 ** ** P.O. Box 5800 Fax: (505)284-0154 ** ** Albuquerque, NM 87185-0370Email: [EMAIL PROTECTED] ** ___ Numpy

Re: [Numpy-discussion] Numpy and C++ integration...

2008-02-04 Thread Bill Spotz
* of upgrading them to numpy, but it hasn't happened yet, to my knowledge. ** Bill Spotz ** ** Sandia National Laboratories Voice: (505)845-0170 ** ** P.O. Box 5800 Fax: (505)284-0154 ** ** Albuquerque, NM 87185-0370

[Numpy-discussion] NPY_FORCECAST

2008-01-25 Thread Bill Spotz
this the default behavior if NPY_FORCECAST is false?) Thanks ** Bill Spotz ** ** Sandia National Laboratories Voice: (505)845-0170 ** ** P.O. Box 5800 Fax: (505)284-0154 ** ** Albuquerque, NM 87185-0370Email: [EMAIL PROTECTED

Re: [Numpy-discussion] [Swig-user] swig numpy2carray converters

2007-12-01 Thread Bill Spotz
(doc/numpy_swig.*) has been updated to reflect all of these changes. A small typo: in the docs you also write about 1D FORTRAN ARGOUTVIEW wrappers: ( DATA_TYPE** ARGOUTVIEW_FARRAY1, DIM_TYPE* DIM1 ) ( DIM_TYPE* DIM1, DATA_TYPE** ARGOUTVIEW_FARRAY1 ) which of course do not exist. ** Bill

Re: [Numpy-discussion] swig numpy2carray converters

2007-11-29 Thread Bill Spotz
all of these changes. On Nov 26, 2007, at 3:52 PM, Christopher Barker wrote: Bill Spotz wrote: First, my plan is to add to numpy.i, typemaps for signatures like the following: %typemap(argout) (double** ARGOUT_ARRAY1, int* DIM1) It is important to note that even though the same argument

Re: [Numpy-discussion] swig numpy2carray converters

2007-11-25 Thread Bill Spotz
file class_example_usage.py: example usage in python And some comments: Bill Spotz schrieb: Here is what I am proposing you do: in your interface file, add something like PyObject * getMatrix() { npy_intp dims[2] = { /* Obtain the dimensions to your internal matrix

Re: [Numpy-discussion] Patch for numpy.i (not C89 compliant)

2007-11-23 Thread Bill Spotz
list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion ** Bill Spotz ** ** Sandia National Laboratories Voice: (505)845-0170 ** ** P.O. Box 5800 Fax: (505)284-0154 ** ** Albuquerque, NM

Re: [Numpy-discussion] swig numpy2carray converters

2007-11-21 Thread Bill Spotz
be able to better explain. ** Bill Spotz ** ** Sandia National Laboratories Voice: (505)845-0170 ** ** P.O. Box 5800 Fax: (505)284-0154 ** ** Albuquerque, NM 87185-0370Email: [EMAIL PROTECTED

Re: [Numpy-discussion] swig numpy2carray converters

2007-11-20 Thread Bill Spotz
. This will never be as big as the Numeric/numarray split, but still Let me know what you are trying to do. If numpy.i can do it, I'll show you how. If not, I'll work to upgrade numpy.i. I suspect it can do everything except the fortran ordering. ** Bill Spotz

Re: [Numpy-discussion] swig numpy2carray converters

2007-11-20 Thread Bill Spotz
? ** Bill Spotz ** ** Sandia National Laboratories Voice: (505)845-0170 ** ** P.O. Box 5800 Fax: (505)284-0154 ** ** Albuquerque, NM 87185-0370Email: [EMAIL PROTECTED] ** ___ Numpy

Re: [Numpy-discussion] swig numpy2carray converters

2007-11-20 Thread Bill Spotz
of t1 isn't going to change, and only a single element is allocated. ** Bill Spotz ** ** Sandia National Laboratories Voice: (505)845-0170 ** ** P.O. Box 5800 Fax: (505)284-0154 ** ** Albuquerque, NM 87185-0370Email

[Numpy-discussion] ANN: Trilinos 8.0, including PyTrilinos 4.0

2007-09-18 Thread Bill Spotz
, communicator and domain decomposition classes. The PyTrilinos interface to Epetra has been designed with a high degree of compatibility with numpy, with the hope of complementing the SciPy development efforts. ** Bill Spotz ** ** Sandia National

Re: [Numpy-discussion] how to include numpy headers when building an extension?

2007-09-11 Thread Bill Spotz
different in the setup.py? I use numpy.i with C++ all the time. Let me know the specific nature of your problem and I'll look into it. ** Bill Spotz ** ** Sandia National Laboratories Voice: (505)845-0170 ** ** P.O. Box 5800 Fax

Re: [Numpy-discussion] Anyone have a well-tested SWIG-based C++ STL valarray = numpy.array typemap to share?

2007-09-05 Thread Bill Spotz
-discussion ** Bill Spotz ** ** Sandia National Laboratories Voice: (505)845-0170 ** ** P.O. Box 5800 Fax: (505)284-5451 ** ** Albuquerque, NM 87185-0370Email: [EMAIL PROTECTED

Re: [Numpy-discussion] Anyone have a well-tested SWIG-based C++ STL valarray = numpy.array typemap to share?

2007-09-05 Thread Bill Spotz
On Sep 5, 2007, at 11:19 AM, Christopher Barker wrote: Bill Spotz wrote: I have been considering adding some C++ STL support to numpy/doc/ swig/ numpy.i. Probably std::vectorTYPE = PyArrayObject (and some std::complexTYPE support as well). Is this what you had in mind? well, std

Re: [Numpy-discussion] Anyone have a well-tested SWIG-based C++ STL valarray = numpy.array typemap to share?

2007-09-05 Thread Bill Spotz
On Sep 5, 2007, at 11:38 AM, Christopher Barker wrote: Of course, it should be possible to write C++ wrappers around the core ND-array object, if anyone wants to take that on! boost::python has done this for Numeric, but last I checked, they have not upgraded to numpy. ** Bill Spotz

Re: [Numpy-discussion] Anyone have a well-tested SWIG-based C++ STL valarray = numpy.array typemap to share?

2007-09-05 Thread Bill Spotz
/listinfo/numpy-discussion ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion ** Bill Spotz ** ** Sandia National Laboratories Voice

Re: [Numpy-discussion] matrix indexing question

2007-03-29 Thread Bill Spotz
matrices?? Cheers, Alan Isaac ** Bill Spotz ** ** Sandia National Laboratories Voice: (505)845-0170 ** ** P.O. Box 5800 Fax: (505)284-5451 ** ** Albuquerque, NM 87185-0370Email: [EMAIL PROTECTED

Re: [Numpy-discussion] matrix indexing question

2007-03-29 Thread Bill Spotz
On Mar 29, 2007, at 6:48 PM, Alan G Isaac wrote: On Thu, 29 Mar 2007, Bill Spotz apparently wrote: What I envisioned was that M[i,:] would return a row_vector and M[:,j] would return a column_vector, because this would be symmetric behavior. M[i], by convention, would behave the same as M[i

Re: [Numpy-discussion] Global Numpy vector with Swig

2007-02-16 Thread Bill Spotz
that as an exercise... On Feb 16, 2007, at 10:59 AM, Andrea Tomadin wrote: Il giorno 15/feb/07, alle ore 22:26, Bill Spotz ha scritto: It seems to me you would need to %ignore vec, so that it is not wrapped as a raw pointer to a double, and then in your interface file create a PyArrayObject whose data

Re: [Numpy-discussion] Global Numpy vector with Swig

2007-02-15 Thread Bill Spotz
___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion ** Bill Spotz ** ** Sandia National Laboratories Voice: (505)845-0170

Re: [Numpy-discussion] Numpy and Python 2.2 on RHEL3

2006-12-05 Thread Bill Spotz
] ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion ** Bill Spotz ** ** Sandia National Laboratories Voice: (505)845-0170