[Numpy-discussion] Unable to building numpy with openblas using bento or distutils

2013-05-28 Thread Dinesh B Vadhia
Maybe this is for the Scipy list but followed the instructions but the command:

$ sudo python setup.py install

to install Scipy failed because it couldn't find Lapack.  However, the export 
commands were set as:

$ export BLAS=/usr/local/lib/libopenblas.a
$ export LAPACK=/usr/local/lib/libopenblas.a
$ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib/

Further, the site.cfg file in the Numpy folder was copied to the Scipy folder.

Numpy built and installed successfully.
Scipy built (with $ python setup.py build) successfully.

Any thoughts?


On Sat, Mar 23, 2013 at 8:44 PM, Skipper Seabold jsseab...@gmail.com wrote:
 On Sat, Mar 23, 2013 at 7:26 PM, Ake Sandgren ake.sandg...@hpc2n.umu.se 
 wrote:
 On Sat, 2013-03-23 at 14:19 -0400, Skipper Seabold wrote:
 Some help on this would be greatly appreciated. It's been recommended
 to use OpenBlas over ATLAS, so I've been trying to build numpy with
 openblas and have run into a few problems.


 To truly support OpenBlas, is it maybe necessary to make some
 additions to numpy/distutils/system_info.py?

 Here is how.

 https://github.com/akesandgren/numpy/commit/363339dd3a9826f3e3e7dc4248c258d3c4dfcd7c



 Thanks that works well for numpy. Test pass. I hope that makes it into
 a pull request. My site.cfg looks like this. I don't know about the
 lapack_opt section. It doesn't seem to work.

 [DEFAULT]
 library_dirs = /home/skipper/.local/lib
 include_dirs = /home/skipper/.local/include

 [openblas]
 libraries = openblas

 [lapack_opt]
 libraries = openblas

 Do you have any idea how to get scipy working too. I have a similar
 site.cfg, but it does not find lapack, which is rolled into
 libopenblas from what I understand. I can do

 export LAPACK=~/.local/lib/libopenblas.a
 python setup.py build  build.log
 sudo -E python setup.py install

 There are no obvious failures in the build.log, but scipy is still
 broken because it needs lapack from numpy I guess.

The answer is to

export BLAS=~/.local/lib/libopenblas.a
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:~/.local/lib/

before building and installing. Now everything works. Whew. Thanks a
lot for the help.


 import numpy as np
 np.show_config()
 lapack_info:
   NOT AVAILABLE
 atlas_threads_info:
   NOT AVAILABLE
 blas_opt_info:
 libraries = ['openblas', 'openblas']
 library_dirs = ['/home/skipper/.local/lib']
 language = f77
 lapack_src_info:
   NOT AVAILABLE
 openblas_info:
 libraries = ['openblas', 'openblas']
 library_dirs = ['/home/skipper/.local/lib']
 language = f77
 lapack_opt_info:
   NOT AVAILABLE
 atlas_info:
   NOT AVAILABLE
 lapack_mkl_info:
   NOT AVAILABLE
 blas_mkl_info:
   NOT AVAILABLE
 mkl_info:
   NOT AVAILABLE
 from scipy import stats
 Traceback (most recent call last):
   File stdin, line 1, in module
   File /usr/local/lib/python2.7/dist-packages/scipy/stats/__init__.py,
 line 320, in module
 from .stats import *
   File /usr/local/lib/python2.7/dist-packages/scipy/stats/stats.py,
 line 242, in module
 import scipy.linalg as linalg
   File /usr/local/lib/python2.7/dist-packages/scipy/linalg/__init__.py,
 line 147, in module
 from .misc import *
   File /usr/local/lib/python2.7/dist-packages/scipy/linalg/misc.py,
 line 5, in module
 from . import blas
   File /usr/local/lib/python2.7/dist-packages/scipy/linalg/blas.py,
 line 113, in module
 from scipy.linalg import _fblas
 ImportError: libopenblas.so.0: cannot open shared object file: No such
 file or directory

 Skipper___
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] variables not defined in numpy.random__init.py__ ?

2013-03-26 Thread Dinesh B Vadhia
@ Ralf.  I missed info.py at the top and it is a valid statement.

@ Brad.  My project is using Numpy and Scipy and falls over at this point when 
using PyInstaller.  One of the project source files has an import random from 
the Standard Library.  As you say, at this point in tempfile.py, it is 
attempting to import random from the Standard Library but instead is 
importing the one from Numpy (numpy.random).  How can this be fixed?  Or, is it 
something for PyInstaller to fix?  Thx.




From: Bradley M. Froehle 
Sent: Monday, March 25, 2013 1:26 PM
To: Discussion of Numerical Python 
Subject: Re: [Numpy-discussion] variables not defined in 
numpy.random__init.py__ ?


On Mon, Mar 25, 2013 at 12:51 PM, Ralf Gommers ralf.gomm...@gmail.com wrote:

  On Mon, Mar 25, 2013 at 4:23 PM, Dinesh B Vadhia dineshbvad...@hotmail.com 
wrote:

Using PyInstaller, the following error occurs:

Traceback (most recent call last):
  File string, line 9, in module
  File //usr/lib/python2.7/dist-packages/PIL/Image.py, line 355, in init
__import__(f, globals(), locals(), [])
  File //usr/lib/python2.7/dist-packages/PIL/IptcImagePlugin.py, line 23, 
in module
import os, tempfile
  File /usr/lib/python2.7/tempfile.py, line 34, in module
from random import Random as _Random
  File //usr/lib/python2.7/dist-packages/numpy/random/__init__.py, line 
90, in module
ranf = random = sample = random_sample
NameError: name 'random_sample' is not defined

Is line 90 in __init.py__ valid?


  It is. 


In my reading of this the main problem is that `tempfile` is trying to import 
`random` from the Python standard library but instead is importing the one from 
within NumPy (i.e., `numpy.random`).  I suspect that somehow `sys.path` is 
being set incorrectly --- perhaps because of the `PYTHONPATH` environment 
variable.


-Brad___
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] Unable to building numpy with openblas usingbento or distutils

2013-03-25 Thread Dinesh B Vadhia
Caveat: Not tested but it did look interesting: 
http://osdf.github.com/blog/numpyscipy-with-openblas-for-ubuntu-1204-second-try.html.
Would be interested to know if it worked out as want to try out OpenBlas in the 
future.___
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] (@Pat Marion) Re: Yes, this one again ImportError: No module named multiarray

2013-03-13 Thread Dinesh B Vadhia
Many thanks Pat - the numpy discussion list is brill.
Go ahead and see if the CPython developers would be interested as it is a 
problem that appears all the time on boards/lists.
Best ... Dinesh



From: Pat Marion 
Sent: Tuesday, March 12, 2013 7:23 AM
To: Aron Ahmadia 
Cc: Discussion of Numerical Python 
Subject: Re: [Numpy-discussion] (@Pat Marion) Re: Yes,this one again 
ImportError: No module named multiarray


Thanks for copying me, Aron.

Hi Dinesh, I have a github project which demonstrates how to use numpy with 
freeze.  The project's readme includes more information:

  https://github.com/patmarion/NumpyBuiltinExample

It does require a small patch to CPython's import.c file.  I haven't tried 
posted this patch to the CPython developers, perhaps there'd be interest 
incorporating it upstream.

Pat
___
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] Yes, this one again ImportError: No module named multiarray

2013-03-13 Thread Dinesh B Vadhia
Hi Chris
Darn!  It worked this morning and I don't know why.

Focused on PyInstaller because it creates a single executable.  Testing on 
all major versions of Windows (32-bit and 64-bit), Linux and OSX.  The 
problem OS is unsurprisingly, Windows XP (SP3).

Numpy was upgraded to the mkl-version and maybe that did the trick.  Tried 
to replicate on an identical Windows XP machine using the standard 
sourceforge distribution but that resulted in a pyinstaller error.

Anyway, using the latest releases of all software ie. Python 2.7.3, Numpy 
1.7.0, Scipy 0.11.0, PyInstaller 2.0.

Will post back if run into problems again.  Best ...


--
From: Chris Barker - NOAA Federal chris.bar...@noaa.gov
Sent: Tuesday, March 12, 2013 2:50 PM
To: Discussion of Numerical Python numpy-discussion@scipy.org
Subject: Re: [Numpy-discussion] Yes,this one again ImportError: No module 
named multiarray

 On Tue, Mar 12, 2013 at 7:05 AM, Dinesh B Vadhia
 dineshbvad...@hotmail.com wrote:
 Does that mean numpy won't work with freeze/create_executable type of 
 tools
 or is there a workaround?

 I've used numpy with py2exe and py2app out of the box with no issues (
 actually, there is an issue with too much stuff getting bundled up,
 but it works)

 ImportError let alone what the solution is.  The Traceback, similar to
 others found on the web, is:

 Traceback (most recent call last):
   File test.py, ...
   File C:\Python27\lib\site-packages\numpy\__init__.py, line 154, in
 module

 This indicates that your code is importing the numpy that's inside the
 system installation -- it should be using one in your app bundle.

 What bundling tool are you using?
 How did you install python/numpy?
 What does your bundling tol config look like?
 And, of course, version numbers of everything.

 -Chris

 -- 

 Christopher Barker, Ph.D.
 Oceanographer

 Emergency Response Division
 NOAA/NOS/ORR(206) 526-6959   voice
 7600 Sand Point Way NE   (206) 526-6329   fax
 Seattle, WA  98115   (206) 526-6317   main reception

 chris.bar...@noaa.gov

 
___
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion


[Numpy-discussion] Yes, this one again ImportError: No module named multiarray

2013-03-12 Thread Dinesh B Vadhia
I've been using Numpy/Scipy for 5 years so know a little on how to get around 
them.  Recently, I've needed to either freeze or create executables with tools 
such as PyInstaller, Cython, Py2exe and others on both Windows (XP 32-bit, 7 
64-bit) and Ubuntu (12.04) Linux (64-bit).  The test program (which runs 
perfectly with the Python interpreter) is very simple:

import numpy

def main():
print numpy.array([12, 23, 34, 45, 56, 67, 78, 89, 90])
return

if __name__ == '__main__':
main()

The software versions are Python 2.7.3, Numpy 1.7.0, and Scipy 0.11.  The 
import numpy causes an ImportError: No module named multiarray.  After 
endless Googling, I am none the wiser about what (really) causes the 
ImportError let alone what the solution is.  The Traceback, similar to others 
found on the web, is:

Traceback (most recent call last):
  File test.py, ...
  File C:\Python27\lib\site-packages\numpy\__init__.py, line 154, in module
import add_newdocs
  File C:\Python27\lib\site-packages\numpy\add_newdocs.py, line 9, in module
from numpy.lib import add_newdoc
  File C:\Python27\lib\site-packages\numpy\lib\__init__.py, line 4, in 
module
from type_check import *
  File C:\Python27\lib\site-packages\numpy\lib\type_check.py, line 8, in 
module
import numpy.core.numeric as _nx
  File C:\Python27\lib\site-packages\numpy\core\__init__.py, line 5, in 
module
import multiarray
ImportError: No module named multiarray.

Could someone shed some light on this - please?  Thx.
___
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] Yes, this one again ImportError: No module named multiarray

2013-03-12 Thread Dinesh B Vadhia
Does that mean numpy won't work with freeze/create_executable type of tools or 
is there a workaround?



From: Aron Ahmadia 
Sent: Tuesday, March 12, 2013 6:17 AM
To: Discussion of Numerical Python 
Subject: Re: [Numpy-discussion] Yes,this one again ImportError: No module 
named multiarray


multiarray is an extension module that lives within numpy/core, that is, when, 
import multiarray is called, (and it's the first imported extension module in 
numpy), multiarray.ext (ext being dll on Windows I guess), gets dynamically 
loaded. 


No module named multiarray is indicating problems with your freeze setup.  
Most of these tools don't support locally imported extension modules.


Does this help you get oriented on your problem?


A



On Tue, Mar 12, 2013 at 1:01 PM, Dinesh B Vadhia dineshbvad...@hotmail.com 
wrote:

  I've been using Numpy/Scipy for 5 years so know a little on how to get 
around them.  Recently, I've needed to either freeze or create executables with 
tools such as PyInstaller, Cython, Py2exe and others on both Windows (XP 
32-bit, 7 64-bit) and Ubuntu (12.04) Linux (64-bit).  The test program (which 
runs perfectly with the Python interpreter) is very simple:

  import numpy

  def main():
  print numpy.array([12, 23, 34, 45, 56, 67, 78, 89, 90])
  return
  
  if __name__ == '__main__':
  main()

  The software versions are Python 2.7.3, Numpy 1.7.0, and Scipy 0.11.  The 
import numpy causes an ImportError: No module named multiarray.  After 
endless Googling, I am none the wiser about what (really) causes the 
ImportError let alone what the solution is.  The Traceback, similar to others 
found on the web, is:

  Traceback (most recent call last):
File test.py, ...
File C:\Python27\lib\site-packages\numpy\__init__.py, line 154, in 
module
  import add_newdocs
File C:\Python27\lib\site-packages\numpy\add_newdocs.py, line 9, in 
module
  from numpy.lib import add_newdoc
File C:\Python27\lib\site-packages\numpy\lib\__init__.py, line 4, in 
module
  from type_check import *
File C:\Python27\lib\site-packages\numpy\lib\type_check.py, line 8, in 
module
  import numpy.core.numeric as _nx
File C:\Python27\lib\site-packages\numpy\core\__init__.py, line 5, in 
module
  import multiarray
  ImportError: No module named multiarray.

  Could someone shed some light on this - please?  Thx.


  ___
  NumPy-Discussion mailing list
  NumPy-Discussion@scipy.org
  http://mail.scipy.org/mailman/listinfo/numpy-discussion



___
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion


[Numpy-discussion] Want to eliminate direct for-loop

2012-02-11 Thread Dinesh B Vadhia
Could the following be written without the direct for-loop?

import numpy
# numpy vector r of any data type and length, eg.
r = numpy.ones(25, dtype='int') 
# s is a list of values (of any data type), eg.
s = [47, 27, 67]
# c is a list of (variable length) lists where the sub-list elements are index 
values of r and len(s) = len(c), eg.
c = [[3, 6, 9], [6, 11, 19, 24], [4, 9, 11, 21 ]]
# for each element in each sub-list c, add corresponding s value to the index 
value in r, eg.
for i, j in enumerate(c):
r[j] += s[i]

So, we get:
r[[3, 6, 9]] += s[0] = 1 + 47 = 48
r[[6, 11, 19, 24]] += s[1] = 1 + 27 = 28
r[[4, 9, 11, 21]] += s[2] = 1 + 67 = 68

ie. r = array([  1,   1,   1,  95,  68,   1, 122,   1,   1, 162,   1,  95,   1, 
 1,   1,   1,   1,   1,   1,  28,   1,  68,   1,   1,  28])

Thank-you!

___
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] Want to eliminate direct for-loop

2012-02-11 Thread Dinesh B Vadhia
Sorry, I copy and pasted the wrong example r result - it should be as you say:
r = array([  1,   1,   1,  48,  68,   1,  75,   1,   1, 115,   1,  95,   1,   
1,   1,   1,   1,   1,   1,  28,   1,  68,   1,   1,  28])

The reason for looking for an alternative solution is performance as the sizes 
of r, s and c are very large with the for-loop calculation repeated 
continuously (with different r, s and c).  




From: eat 
Sent: Saturday, February 11, 2012 3:12 PM
To: Discussion of Numerical Python 
Subject: Re: [Numpy-discussion] Want to eliminate direct for-loop


Hi,


On Sat, Feb 11, 2012 at 10:56 PM, Dinesh B Vadhia dineshbvad...@hotmail.com 
wrote:

  Could the following be written without the direct for-loop?

  import numpy
  # numpy vector r of any data type and length, eg.
  r = numpy.ones(25, dtype='int') 
  # s is a list of values (of any data type), eg.
  s = [47, 27, 67]
  # c is a list of (variable length) lists where the sub-list elements are 
index values of r and len(s) = len(c), eg.
  c = [[3, 6, 9], [6, 11, 19, 24], [4, 9, 11, 21 ]]
  # for each element in each sub-list c, add corresponding s value to the index 
value in r, eg.
  for i, j in enumerate(c):
  r[j] += s[i]

  So, we get:
  r[[3, 6, 9]] += s[0] = 1 + 47 = 48
  r[[6, 11, 19, 24]] += s[1] = 1 + 27 = 28
  r[[4, 9, 11, 21]] += s[2] = 1 + 67 = 68

  ie. r = array([  1,   1,   1,  95,  68,   1, 122,   1,   1, 162,   1,  95,   
1,  1,   1,   1,   1,   1,   1,  28,   1,  68,   1,   1,  28])

  Thank-you!
Could you describe more detailed manner about why you want to get rid of that 
loop? Performance wise? If so, do you have profiled what's the bottleneck?


Please provide also a more detailed description of your problem, since now your 
current spec seems to yield:
r= array([  1,   1,   1,  48,  68,   1,  75,   1,   1, 115,   1,  95,   1,
1,   1,   1,   1,   1,   1,  28,   1,  68,   1,   1,  28])




My 2 cents,
-eat



  ___
  NumPy-Discussion mailing list
  NumPy-Discussion@scipy.org
  http://mail.scipy.org/mailman/listinfo/numpy-discussion


___
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion


[Numpy-discussion] Fw: sparse vectors / matrices / tensors

2011-09-20 Thread Dinesh B Vadhia
Yannick
Sounds great.  Would cross-post on the Scipy list as that is where the 
scipy.sparse developers hang out.
Dinesh



From: Yannick Versley 
Sent: Tuesday, September 20, 2011 8:33 AM
To: Discussion of Numerical Python 
Subject: Re: [Numpy-discussion] sparse vectors / matrices / tensors


  This question seems like it's more relevant to the scipy mailing list,
  since scipy has scipy.sparse.

My point was that the current situation (i.e., people reinventing the wheel)
was a by-product of the fact that there's nothing as standardized as
numpy's ndarray or Python's buffer interface, if only for the
simple reason that most people only ever work with dense matrices.


(scipy.sparse uses several different data structures that are all limited
to two axes, and have no common low-level interface).


I'll be happy to ask on the scipy list, if that's where the discussion should 
be.


Yannick___
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] Timeline for 1.4.0 and installer for Windows64bit ?

2009-07-31 Thread Dinesh B Vadhia
A suggestion:  

How about releasing Numpy for the AMD64 version first (without Scipy) and then 
follow up with a later release with Scipy support?  This would satisfy 
Numpy-only users which can't be a bad thing rather than having a version that 
is not usable (I believe) by either Numpy or Scipy users.

Dinesh



From: David Cournapeau 
Sent: Thursday, July 30, 2009 8:15 PM
To: Discussion of Numerical Python 
Subject: Re: [Numpy-discussion] Timeline for 1.4.0 and installer for 
Windows64bit ?


Hi Klaus,

Klaus Noekel wrote:
 Dear folks,

 just over a month ago there was a thread about plans for numpy, and IIRC 
 somebody had volunteered to try and put together a working AMD64 version 
 with an installer.

 Since then I have not heard about the issue again - but I may have 
 missed part of the discussion. Have the plans firmed up by now? Is there 
 a tentative date for a beta or RC? In particular: how much hope is there 
 for a reasonably usable AMD64 numpy under Windows?
   

There were some discussion about pushing 1.4.0 'early', but instead, I
think we let it slipped - one consequence is that there will be enough
time for 1.4.0 to be released with proper AMD64 support on windows.

The real issue is not numpy per-se, but making scipy work on top of
numpy in 64 bits mode. It is hard to give an exact date as to when those
issues will be fixed, but it is being worked on.

cheers,

David

___
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] Import Numpy on Windows Vista x64 AMD

2009-06-27 Thread Dinesh B Vadhia
Okay.  Maybe a bit harsh, but wouldn't it be better not to have the release as 
available if it cannot be imported?



From: David Cournapeau 
Sent: Friday, June 26, 2009 7:00 PM
To: Discussion of Numerical Python 
Subject: Re: [Numpy-discussion] Import Numpy on Windows Vista x64 AMD


On Sat, Jun 27, 2009 at 6:42 AM, Dinesh B
Vadhiadineshbvad...@hotmail.com wrote:
 Ticket# 1084
 (http://projects.scipy.org/numpy/timeline?from=2009-06-09T03%3A01%3A59-0500precision=second)
 says that the numpy import on Windows Vista x64 AMD systems works now.

I mistakenly closed it as fixed, but it is just a duplicate. The
problem persists,

David

___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] Import Numpy on Windows Vista x64 AMD

2009-06-27 Thread Dinesh B Vadhia
The machine in question is factory installed with:

OS: Windows Vista 64-bit SP2
Processor: Intel Core2 Quad CPU, Q6600 @ 2.4Ghz @2.4GHz
Memory:  8Gb

Apart from Python 2.5.4 nothing has been installed on this machine as it is 
being used only to run Python programs.  

Python 2.6.1 was installed so that Numpy 1.3 could be installed.  Numpy was 
installed per machine and per-user and each time import numpy didn't work.

If Numpy cannot be imported on this plain-vanilla machine what configuration 
does it work on?

Dinesh



From: David Cournapeau 
Sent: Saturday, June 27, 2009 10:21 AM
To: Discussion of Numerical Python 
Subject: Re: [Numpy-discussion] Import Numpy on Windows Vista x64 AMD


On Sun, Jun 28, 2009 at 2:05 AM, Dinesh B
Vadhiadineshbvad...@hotmail.com wrote:
 Okay.  Maybe a bit harsh, but wouldn't it be better not to have the release
 as available if it cannot be imported?

It cannot be imported in some situations, but it works fine in others.

David

___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion


[Numpy-discussion] Import Numpy on Windows Vista x64 AMD

2009-06-26 Thread Dinesh B Vadhia
Ticket# 1084 
(http://projects.scipy.org/numpy/timeline?from=2009-06-09T03%3A01%3A59-0500precision=second)
 says that the numpy import on Windows Vista x64 AMD systems works now.  Is 
this for Numpy 1.3 or 1.4 and if 1.3 has anyone tried it successfully?  Thanks.

Dinesh

___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] Installation problem with Numpy 1.3 onWindows AMD64

2009-05-30 Thread Dinesh B Vadhia
re: But it means that under some conditions, numpy crashes before import.

It it helps the debugging, I have a standard Windows 64-bit configuration.  
Please let me know when this build is fixed ... Cheers

Dinesh



From: David Cournapeau 
Sent: Saturday, May 30, 2009 2:14 AM
To: Discussion of Numerical Python 
Subject: Re: [Numpy-discussion] Installation problem with Numpy 1.3 onWindows 
AMD64


On Sat, May 30, 2009 at 8:02 AM, Dinesh B Vadhia
dineshbvad...@hotmail.com wrote:
 Hi!  I just upgraded to Python 2.6.2 (from 2.5) on Windows AMD64 in order to
 use Numpy 1.3 for AMD64 and got the following error:

 - pythonw.exe has stopped working

 Numpy was installed both per-machine and per-user but the error persists.
 Python 2.6.2 works without Numpy.

The 64 bits build is experimental on windows - there is one
fundamental issue which I have not been able to nail down yet. It may
be a numpy bug, a python bug, or a mingw-w64 bug, I am not sure yet.
But it means that under some conditions, numpy crashes before import.

If you need a working 64 bits numpy, the best bet is to build it by
yourself using the MS compilers (the 64 bits compilers are available
for free if you install the platform SDK 6.0a or later). But then you
won't be able to build scipy on top of it unless you manage to use a
64 bits fortran compiler.

David

___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion


[Numpy-discussion] Installation problem with Numpy 1.3 on Windows AMD64

2009-05-29 Thread Dinesh B Vadhia
Hi!  I just upgraded to Python 2.6.2 (from 2.5) on Windows AMD64 in order to 
use Numpy 1.3 for AMD64 and got the following error:

- pythonw.exe has stopped working

Numpy was installed both per-machine and per-user but the error persists.  
Python 2.6.2 works without Numpy.  

Any ideas?

Dinesh



___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] How to tell whether I am using 32 bit or 64bit numpy?

2009-03-28 Thread Dinesh B Vadhia
Uhmmm!  I installed 64-bit Python (2.5x) on a Windows 64-bit Vista machine 
(yes, strange but true) hoping that the 32-bit Numpy  Scipy libraries would 
work but they didn't. 


 
From: Charles R Harris 
Sent: Saturday, March 28, 2009 4:28 AM
To: Discussion of Numerical Python 
Subject: Re: [Numpy-discussion] How to tell whether I am using 32 bit or 64bit 
numpy?




 
On Sat, Mar 28, 2009 at 5:23 AM, John Reid j.r...@mail.cryst.bbk.ac.uk wrote:

David Cournapeau wrote:
 from platform import machine
 print machine()

 Should give you something like x86_64 for 64 bits intel/amd architecture,



  In [3]: from platform import machine

  In [4]: print machine()
  i686


  Now I'm wondering why the OS isn't 64 bit but that's not for discussion
  here I guess.


What really matters is if python is 64 bits. Most 64 bit systems also run 32 
bit binaries.

Chuck 





 ___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] How to tell whether I am using 32 bitor 64bit numpy?

2009-03-28 Thread Dinesh B Vadhia
David

1)  32-bit Numpy/Scipy with 32-bit Python on 64-bit Windows does work.  But, it 
doesn't take advantage of memory  2gb.

2)  Happy to help out with the experimental 64-bit builds of Numpy/Scipy.  But, 
would this be with pre-installed Windows libraries or source files as I'm not 
setup for dealing with source files?  The machine has an Intel Core2 Quad CPU 
with 8gb ram.  Strangely, the 64-bit Python 2.5x Intel version wouldn't install 
but the AMD version did.

Dinesh

 


From: David Cournapeau 
Sent: Saturday, March 28, 2009 6:16 AM
To: Discussion of Numerical Python 
Subject: Re: [Numpy-discussion] How to tell whether I am using 32 bitor 64bit 
numpy?


Dinesh B Vadhia wrote:
 Uhmmm!  I installed 64-bit Python (2.5x) on a Windows 64-bit Vista
 machine (yes, strange but true) hoping that the 32-bit Numpy  Scipy
 libraries would work but they didn't.

That's a totally different situation: in your case, python and numpy
share the same address space in one process (for all purpose, numpy is a
dll for python), and you certainly can't mix 32 and 64 bits in the same
process. What you can do is running 32 bits numpy/scipy for a 32 bits
python on windows 64 bits...

... or helping us making numpy and scipy work on windows 64 bits by
testing the experimental 64 bits builds of numpy/scipy for windows :)

cheers,

David

___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion


[Numpy-discussion] Sorting large numbers of co-ordinate pairs

2009-03-13 Thread Dinesh B Vadhia
I have a large number ( 1bn) of (32-bit) integer co-ordinates (i, j) in a 
file.  The i are ordered and the j unordered eg.
...
6940, 22886
6940, 38277
6940, 43788
7007, 0
7007, 2362
7007, 34
etc.
...

I want to create (j, i) with j ordered and i unordered and store in a file ie.
...
38277, 567
38277, 90023
38277, 6940
43788, 5672
43788, 98
etc
...

My computers have sufficient memory (2gb on one and 8gb on another).

Any ideas how I could do this using numpy?

Dinesh
___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion


[Numpy-discussion] take a numpy

2008-09-24 Thread Dinesh B Vadhia
I'm using numpy take() to pickout elements from a (1xM) array A indicated by 
the index numbers in indices ie.

B = A.take(indices = list_indexes)

It work perfectly but as A is large the performance isn't great and was 
wondering if there are faster methods available or ways to improve the use of 
take()?

Dinesh


___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman/listinfo/numpy-discussion


[Numpy-discussion] Does Unreasonable Matrix Behavior affect Scipy Sparse

2008-04-25 Thread Dinesh B Vadhia
I had b = Ax working where A is sparse using scipy.sparse.

I'm now using the latest svn and b = Ax is not working and returns garbage 
results.

Nothing has changed except the latest svn.  Any thoughts?

Dinesh


___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman/listinfo/numpy-discussion


[Numpy-discussion] dimensions too large error

2008-03-14 Thread Dinesh B Vadhia
For the following code:

I = 18000
J = 33000
filename = 'ij.txt'
A = scipy.asmatrix(numpy.empty((I,J), dtype=numpy.int))
for line in open(filename, 'r'):
etc.

The following message appears:

Traceback (most recent call last):
File C:\...\py, line 362, in module
A= scipy.asmatrix(numpy.empty((I,J), dtype=numpy.int))
ValueError: dimensions too large.

Is there a limit to array/matrix dimension sizes?  

Btw, for numpy array's, ascontiguousarray() is available to set aside 
contiguous memory.  Is there an equivalent for scipy matrix ie. an 
ascontiguousmatrix()?

Dinesh
___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman/listinfo/numpy-discussion


[Numpy-discussion] Array assignment problem

2008-03-11 Thread Dinesh B Vadhia
Hello!  I'm reading a text file with two numbers in str format on each line.  
The numbers are converted into integers.  Each integer is then assigned to a 
2-dimensional array ij (see code below).  The problem is that neither of the 
array assignments work ie. both ij[index, 0] = r and ij[index, 1] = c are 
always 0 (zero).  I've checked r and c and both are integers (=0).  

import sys
import os
import numpy

nnz = 120
ij = numpy.array(numpy.empty((nnz, 2), dtype=int))
index = 0
filename = 'test_ij.txt'
for line in open(filename, 'r'):
line = line.rstrip('\n')
r, c = map(str, line.split(','))
r = int(r)
c = int(c)
ij[index, 0] = r
ij[index, 1] = c
index = index + 1

What am I doing wrong?

Dinesh
___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman/listinfo/numpy-discussion


[Numpy-discussion] Pickling and initializing

2008-03-03 Thread Dinesh B Vadhia
When you pickle a numpy/scipy matrix does it have to be initialized by another 
program?  For example:

Program One:
A = scipy.asmatrix(scipy.empty((i, i)), dtype=int)# initialize 
matrix A
do something with A
pickle.dump(A)

Program Two:
pickle.load(A)


.. in Program Two, do we need the statement:

A = scipy.asmatrix(scipy.empty((i, i)), dtype=int)# initialize 
matrix A

before the pickle.load(A)?

If not, why not and doesn't this make documentation difficult?

Dinesh
___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman/listinfo/numpy-discussion


[Numpy-discussion] import issue with new Python

2008-02-15 Thread Dinesh B Vadhia
I upgraded to Python 2.5.2c1 today, and got the following error for:

 import numpy
 import scipy

Traceback (most recent call last):
  File C:\ ... .py, line 19, in module
import scipy
ImportError: No module named scipy

I'm using Numpy 1.0.4 and Scipy 0.6.

Any ideas?

Dinesh

___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman/listinfo/numpy-discussion