[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 argum

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 at this and

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 &

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

2011-08-30 Thread Mark Janikas
, Mark Janikas 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 dep

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
alues, operator norm, etc.. -Chris JS On Tue, Aug 30, 2011 at 5:48 PM, Mark Janikas 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

[Numpy-discussion] Question on LinAlg Inverse Algorithm

2011-08-30 Thread Mark Janikas
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.com<mailto:mjani...@esri.

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 mailto: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 and constru

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

2011-08-26 Thread Mark Janikas
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 of a

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

2011-08-26 Thread Mark Janikas
riday, 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 wrote: > Hello All, > > > > I am trying to identify columns of a matrix that are perfectly colline

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

2011-08-26 Thread Mark Janikas
As you will note, since most of the functions work on rows, the matrix in question has been transposed. From: numpy-discussion-boun...@scipy.org [mailto:numpy-discussion-boun...@scipy.org] On Behalf Of Mark Janikas Sent: Friday, August 26, 2011 10:11 AM To: 'Discussion of Numerical P

[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. NUM.corrcoef(m

[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 enumerat

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

2009-10-02 Thread Mark Janikas
2:34 PM 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?

[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.com<mailto:mjan

Re: [Numpy-discussion] Timing array construction

2009-04-30 Thread Mark Janikas
anks again! 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 Ma

Re: [Numpy-discussion] Timing array construction

2009-04-30 Thread Mark Janikas
ring Sent: Wednesday, April 29, 2009 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 fa

[Numpy-discussion] Timing array construction

2009-04-29 Thread Mark Janikas
RESULT N, useAsArray, useArray, useC 100, 0.0066, 0.0065, 0.0007 200, 0.0137, 0.0140, 0.0008 400, 0.0277, 0.0288, 0.0007 800, 0.0579, 0.0577, 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.

Re: [Numpy-discussion] Permutations in Simulations`

2009-02-10 Thread Mark Janikas
0)` ? Doesn't > it also work without it, or am I missing something in how this works?> > > Josef > > On 2/10/09, Mark Janikas wrote: >> Thanks to all for your replies. I want this to work on any vector so I was >> thinking this...? >> >> import numpy as n

Re: [Numpy-discussion] Permutations in Simulations`

2009-02-10 Thread Mark Janikas
th Goodman wrote: >>> On Tue, Feb 10, 2009 at 11:29 AM, Mark Janikas wrote: >>>> I want to create an array that contains a column of permutations for each >>>> simulation: >>>> >>>> import numpy as NUM >>>> >>>> import

[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.com<mailto:mjani...@esri.com> ___ Numpy-discussion mailing list Numpy-discussion@scipy.or

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):

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 i

[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] Dynamic module not initialized properly

2007-04-02 Thread Mark Janikas
s during Py_Finalize. Greg ____ From: [EMAIL 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,

[Numpy-discussion] Dynamic module not initialized properly

2007-03-30 Thread Mark Janikas
even after I make a change Not sure whether there is anything I can do from the scripting side (some alternative form of reload?)... or if I have to forward it along to the C developers. You have my appreciation ahead of time. Mark Janikas Product Engineer ESRI, Geoprocessing 380 New Y

Re: [Numpy-discussion] Source install

2007-02-28 Thread Mark Janikas
Thanks Robert, All good info as usual. Best wishes, MJ -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Robert Kern Sent: Wednesday, February 28, 2007 3:32 PM To: Discussion of Numerical Python Subject: Re: [Numpy-discussion] Source install Mark

Re: [Numpy-discussion] Source install

2007-02-28 Thread Mark Janikas
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-discussion] Source install

2007-02-28 Thread Mark Janikas
nt me 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-

Re: [Numpy-discussion] Greek Letters

2007-02-20 Thread Mark Janikas
: Discussion of Numerical Python Subject: Re: [Numpy-discussion] Greek Letters Mark Janikas wrote: > Thanks Robert but alas, I get. > >>>> import sys >>>> sys.stdout.encoding > 'cp437' >>>> print u'\u03a7\u00b2'.encode(sys.stdout.e

Re: [Numpy-discussion] Greek Letters

2007-02-20 Thread Mark Janikas
inal Message- From: [EMAIL PROTECTED] [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.e

Re: [Numpy-discussion] Greek Letters

2007-02-20 Thread Mark Janikas
s Thanks again, MJ -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Robert Kern Sent: Tuesday, February 20, 2007 4:20 PM To: Discussion of Numerical Python Subject: Re: [Numpy-discussion] Greek Letters Mark Janikas wrote: > Hello all, > >

Re: [Numpy-discussion] Greek Letters

2007-02-20 Thread Mark Janikas
f Medicine On Feb 20, 2007, at 3:56 PM, 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

[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

[Numpy-discussion] Update on sparse matrix in binary

2007-02-15 Thread Mark Janikas
I wanted to thank all of you who helped me with my making my sparse matrix representation cross-platform in binary format! I ended up writing and reading everything explicitly in little endian. To recap, each row in the matrix is represented by three records: 1) row#, nn (number of no

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

2007-02-13 Thread Mark Janikas
Found a typo-or-two in my description. #2 and #3 are nnx1 in shape -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Mark Janikas Sent: Tuesday, February 13, 2007 4:31 PM To: Discussion of Numerical Python Subject: Re: [Numpy-discussion] fromstring

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

2007-02-13 Thread Mark Janikas
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 do

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 o

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

2007-02-13 Thread Mark Janikas
on 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 e

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 usin

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

2007-02-13 Thread Mark Janikas
Of Stefan van der Walt Sent: Tuesday, February 13, 2007 12:03 PM To: numpy-discussion@scipy.org Subject: Re: [Numpy-discussion] fromstring, tostring slow? On Tue, Feb 13, 2007 at 11:42:35AM -0800, Mark Janikas wrote: > I am finding that directly packing numpy arrays into binary using the to

[Numpy-discussion] fromstring, tostring slow?

2007-02-13 Thread Mark Janikas
ot; is not constant across the records, so many of the database structures I have looked at do not apply. Any suggestions would be greatly appreciated. Mark Janikas ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects

Re: [Numpy-discussion] Fast vector multiplication

2007-01-19 Thread Mark Janikas
multiplication On 1/19/07, Mark Janikas <[EMAIL PROTECTED]> wrote: Hello all, I am trying to figure out the most efficient way to get the sum of the product of two vectors where id != id. E.g.: X = array([1,2,3]) Y = array([1,2,3]) Z = (1*2) + (1*3) + (2*1) + (2*3) + (3*1) + (3*2

[Numpy-discussion] Fast vector multiplication

2007-01-19 Thread Mark Janikas
if there is a version of multiply that could be used... or a form of vectorize. Any ideas would be greatly appreciated. Mark Janikas Product Engineer ESRI, Geoprocessing 380 New York St. Redlands, CA 92373 909-793-2853 (2563) [EMAIL PROTECTED

Re: [Numpy-discussion] Newbie Question, Probability

2006-12-21 Thread Mark Janikas
Thanks for all the input so far. The only thing that seems odd about the omission of probability or quantile functions in NumPy is that all the random number generators are present in RandomArray. At any rate, hopefully this bit of functionality will be present in the future, but for now, IMO the

[Numpy-discussion] Newbie Question, Probability

2006-12-20 Thread Mark Janikas
reatly 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/li