[Numpy-discussion] PyArray_PutTo Question

2013-07-05 Thread Mark Janikas
Hi All, I am a bit new to the NumPy C-API and I am having a hard time with placing results into output arrays... I am using PyArray_TakeFrom to grab an input dimension of data, then do a calculation, then I want to pack it back to the output... yet the PutTo function does not have an axis

[Numpy-discussion] Most efficient trim of arrays

2010-12-14 Thread Mark Janikas
Hello All, I was wondering what the best way to trim an array based on some values I do not want I could use NUM.where or NUM.take... but let me give you an example: import numpy as NUM n = 100 (Length of my dataset) data = NUM.empty((n,), float) badRecords = [] for ind, record in

[Numpy-discussion] Identifying Colinear Columns of a Matrix

2011-08-26 Thread Mark Janikas
Hello All, I am trying to identify columns of a matrix that are perfectly collinear. It is not that difficult to identify when two columns are identical are have zero variance, but I do not know how to ID when the culprit is of a higher order. i.e. columns 1 + 2 + 3 = column 4.

Re: [Numpy-discussion] Identifying Colinear Columns of a Matrix

2011-08-26 Thread Mark Janikas
, August 26, 2011 10:28 AM To: Discussion of Numerical Python Subject: Re: [Numpy-discussion] Identifying Colinear Columns of a Matrix On Fri, Aug 26, 2011 at 1:10 PM, Mark Janikas mjani...@esri.com wrote: Hello All, I am trying to identify columns of a matrix that are perfectly collinear

Re: [Numpy-discussion] Identifying Colinear Columns of a Matrix

2011-08-26 Thread Mark Janikas
the whole k! algorithm. MJ -Original Message- From: numpy-discussion-boun...@scipy.org [mailto:numpy-discussion-boun...@scipy.org] On Behalf Of Mark Janikas Sent: Friday, August 26, 2011 10:35 AM To: Discussion of Numerical Python Subject: Re: [Numpy-discussion] Identifying Colinear Columns

Re: [Numpy-discussion] Identifying Colinear Columns of a Matrix

2011-08-26 Thread Mark Janikas
-discussion] Identifying Colinear Columns of a Matrix On Fri, Aug 26, 2011 at 11:41 AM, Mark Janikas mjani...@esri.commailto:mjani...@esri.com wrote: I wonder if my last statement is essentially the only answer... which I wanted to avoid... Should I just use combinations of the columns and try

[Numpy-discussion] Question on LinAlg Inverse Algorithm

2011-08-30 Thread Mark Janikas
the LinAlgError()... this suggests that there is some kind of random component to the INV method. Is this normal? Thanks much ahead of time, MJ Mark Janikas Product Developer ESRI, Geoprocessing 380 New York St. Redlands, CA 92373 909-793-2853 (2563) mjani...@esri.commailto:mjani...@esri.com

Re: [Numpy-discussion] Question on LinAlg Inverse Algorithm

2011-08-30 Thread Mark Janikas
, operator norm, etc.. -Chris JS On Tue, Aug 30, 2011 at 5:48 PM, Mark Janikas mjani...@esri.com wrote: Hello All, Last week I posted a question involving the identification of linear dependent columns of a matrix. but now I am finding an interesting result based on the linalg.inv

Re: [Numpy-discussion] Question on LinAlg Inverse Algorithm

2011-08-30 Thread Mark Janikas
When I export to ascii I am losing precision and it getting consistency... I will try a flat dump. More to come. TY MJ -Original Message- From: numpy-discussion-boun...@scipy.org [mailto:numpy-discussion-boun...@scipy.org] On Behalf Of Mark Janikas Sent: Tuesday, August 30, 2011 4:02

Re: [Numpy-discussion] Question on LinAlg Inverse Algorithm

2011-08-30 Thread Mark Janikas
, Mark Janikas mjani...@esri.com wrote: Hello All, Last week I posted a question involving the identification of linear dependent columns of a matrix… but now I am finding an interesting result based on the linalg.inv() function… sometime I am able to invert a matrix that has linear dependent

Re: [Numpy-discussion] Question on LinAlg Inverse Algorithm

2011-08-31 Thread Mark Janikas
Inverse Algorithm On Tue, 30 Aug 2011 15:48:18 -0700, Mark Janikas wrote: Last week I posted a question involving the identification of linear dependent columns of a matrix... but now I am finding an interesting result based on the linalg.inv() function... sometime I am able to invert a matrix

Re: [Numpy-discussion] Question on LinAlg Inverse Algorithm

2011-08-31 Thread Mark Janikas
-boun...@scipy.org] On Behalf Of Bruce Southey Sent: Wednesday, August 31, 2011 11:11 AM To: numpy-discussion@scipy.org Subject: Re: [Numpy-discussion] Question on LinAlg Inverse Algorithm On 08/31/2011 12:56 PM, Mark Janikas wrote: Right indeed... I have spent a lot of time looking

[Numpy-discussion] Newbie Question, Probability

2006-12-20 Thread Mark Janikas
appreciated. Mark Janikas Product Engineer ESRI, Geoprocessing 380 New York St. Redlands, CA 92373 909-793-2853 (2563) [EMAIL PROTECTED] ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy

Re: [Numpy-discussion] fromstring, tostring slow?

2007-02-13 Thread Mark Janikas
Yup. It was faster to: Use lists for the append, then transform into an array, then transform into a binary string Rather than Create empty arrays and use its append method, then transform into a binary string. The last question on the output when then be to test the speed of

Re: [Numpy-discussion] fromstring, tostring slow?

2007-02-13 Thread Mark Janikas
of Numerical Python Subject: Re: [Numpy-discussion] fromstring, tostring slow? Mark Janikas wrote: I am finding that directly packing numpy arrays into binary using the tostring and fromstring methods For starters, use fromfile and tofile, to save the overhead of creating an entire extra string

Re: [Numpy-discussion] fromstring, tostring slow?

2007-02-13 Thread Mark Janikas
] On Behalf Of Stefan van der Walt Sent: Tuesday, February 13, 2007 3:52 PM To: numpy-discussion@scipy.org Subject: Re: [Numpy-discussion] fromstring, tostring slow? On Tue, Feb 13, 2007 at 03:44:37PM -0800, Mark Janikas wrote: I don't think I can do that because I have heterogeneous rows of data

Re: [Numpy-discussion] fromstring, tostring slow?

2007-02-13 Thread Mark Janikas
of Numerical Python Subject: Re: [Numpy-discussion] fromstring, tostring slow? Mark Janikas wrote: I don't think I can do that because I have heterogeneous rows of data I.e. the columns in each row are different in length. like I said, show us your whole problem... But you don't have

[Numpy-discussion] Greek Letters

2007-02-20 Thread Mark Janikas
Hello all, I was wondering how I could print the chi-squared symbol in python. I have been looking at the Unicode docs, but I figured I would ask for assistance here while I delve into it. Thanks for any help in advance. Mark Janikas Product Engineer ESRI, Geoprocessing 380 New York

Re: [Numpy-discussion] Greek Letters

2007-02-20 Thread Mark Janikas
, Mark Janikas wrote: Hello all, I was wondering how I could print the chi-squared symbol in python. I have been looking at the Unicode docs, but I figured I would ask for assistance here while I delve into it. Thanks for any help in advance. Mark Janikas Product Engineer

Re: [Numpy-discussion] Greek Letters

2007-02-20 Thread Mark Janikas
] [mailto:[EMAIL PROTECTED] On Behalf Of Mark Janikas Sent: Tuesday, February 20, 2007 5:16 PM To: Discussion of Numerical Python Subject: Re: [Numpy-discussion] Greek Letters Thanks Robert but alas, I get. import sys sys.stdout.encoding 'cp437' print u'\u03a7\u00b2'.encode

[Numpy-discussion] Source install

2007-02-28 Thread Mark Janikas
to a platform-independent doc on how to install from the source tar file? Thanks ahead of time, MJ Mark Janikas Product Engineer ESRI, Geoprocessing 380 New York St. Redlands, CA 92373 909-793-2853 (2563) [EMAIL PROTECTED] ___ Numpy-discussion

Re: [Numpy-discussion] Source install

2007-02-28 Thread Mark Janikas
in advance MJ -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Robert Kern Sent: Wednesday, February 28, 2007 11:26 AM To: Discussion of Numerical Python Subject: Re: [Numpy-discussion] Source install Mark Janikas wrote: Hello all, I have used numpy

Re: [Numpy-discussion] Dynamic module not initialized properly

2007-04-02 Thread Mark Janikas
PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Mark Janikas Sent: Friday, March 30, 2007 4:55 PM To: Discussion of Numerical Python Subject: [Numpy-discussion] Dynamic module not initialized properly Hello all, I am having an issue importing numpy on subsequent (I.e. not on first load

[Numpy-discussion] Silent install of .exe

2007-04-04 Thread Mark Janikas
Is there a way to silently install the numpy.exe from a Microsoft DOS prompt? Something like: numpy-1.0.2.win32-py2.4.exe -silent Thanks ahead of time... MJ Mark Janikas Product Engineer ESRI, Geoprocessing 380 New York St. Redlands, CA 92373 909-793-2853 (2563) [EMAIL

Re: [Numpy-discussion] numpy and freeze.py

2007-05-22 Thread Mark Janikas
I cant be sure if your issue is related to mine, so I was wondering where/when you got your numpy build? My issue: http://projects.scipy.org/pipermail/numpy-discussion/2007-April/027000.h tml Travis has been kind enough to work with me on it. His changes are in the svn. So, I don't think this

Re: [Numpy-discussion] appending extra items to arrays

2007-10-11 Thread Mark Janikas
If you do not know the size of your array before you finalize it, then you should use lists whenever you can. I just cooked up a short example: ## import timeit import numpy as N values = range(1) def appendArray(values):

[Numpy-discussion] Permutations in Simulations`

2009-02-10 Thread Mark Janikas
? Thanks so much ahead of time... MJ Mark Janikas Product Engineer ESRI, Geoprocessing 380 New York St. Redlands, CA 92373 909-793-2853 (2563) mjani...@esri.commailto:mjani...@esri.com ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http

Re: [Numpy-discussion] Permutations in Simulations`

2009-02-10 Thread Mark Janikas
Goodman kwgood...@gmail.com wrote: On Tue, Feb 10, 2009 at 11:29 AM, Mark Janikas mjani...@esri.com wrote: I want to create an array that contains a column of permutations for each simulation: import numpy as NUM import numpy.random as RAND x = NUM.arange(4.) res = NUM.zeros((4,100

Re: [Numpy-discussion] Permutations in Simulations`

2009-02-10 Thread Mark Janikas
)` ? Doesn't it also work without it, or am I missing something in how this works? Josef On 2/10/09, Mark Janikas mjani...@esri.com wrote: Thanks to all for your replies. I want this to work on any vector so I was thinking this...? import numpy as np import timeit x = np.array([4.,5.,10.,3

[Numpy-discussion] Timing array construction

2009-04-29 Thread Mark Janikas
, 0.0008 1600, 0.1175, 0.1289, 0.0009 3200, 0.2291, 0.2309, 0.0012 6400, 0.4561, 0.4564, 0.0013 12800, 0.9218, 0.9122, 0.0019 Mark Janikas Product Engineer ESRI, Geoprocessing 380 New York St. Redlands, CA 92373 909-793-2853 (2563) mjani...@esri.commailto:mjani...@esri.com

Re: [Numpy-discussion] Timing array construction

2009-04-30 Thread Mark Janikas
11:49 PM To: Discussion of Numerical Python Subject: Re: [Numpy-discussion] Timing array construction Mark Janikas wrote: Hello All, I was exploring some different ways to concatenate arrays, and using c_ is the fastest by far. Is there a difference I am missing that can account

Re: [Numpy-discussion] Timing array construction

2009-04-30 Thread Mark Janikas
! MJ -Original Message- From: numpy-discussion-boun...@scipy.org [mailto:numpy-discussion-boun...@scipy.org] On Behalf Of Christopher Barker Sent: Thursday, April 30, 2009 12:16 PM To: Discussion of Numerical Python Subject: Re: [Numpy-discussion] Timing array construction Mark Janikas

[Numpy-discussion] Database with Nulls to Numpy Structure

2009-10-02 Thread Mark Janikas
the arrays... Or do I fill up the pre-allocated empty arrays and slice off the ends? Thoughts? Thanks much... MJ Mark Janikas Product Engineer ESRI, Geoprocessing 380 New York St. Redlands, CA 92373 909-793-2853 (2563) mjani...@esri.commailto:mjani...@esri.com

Re: [Numpy-discussion] Database with Nulls to Numpy Structure

2009-10-02 Thread Mark Janikas
To: Discussion of Numerical Python Subject: Re: [Numpy-discussion] Database with Nulls to Numpy Structure Mark Janikas wrote: So, do I use lists and append then create the arrays... Or do I fill up the pre-allocated empty arrays and slice off the ends? Thoughts? Thanks much... Either will work