Hi,
Has anybody ever tried using the Matlab compiler to build a standalone
library that would be callable using Python?
We have a lot of leftover Matlab code that we are trying to migrate.
Thanks!

Hello All, I'm attempting to create a python wrapper, for a Fortran
subroutine, using f2py.
My system details are:
>>> sys.version '2.6.4 (r264:75708, Oct 26 2009, 08:23:19) [MSC v.1500
32 bit (Intel)]'
>>> sys.getwindowsversion() (5, 1, 2600, 2, 'Service Pack 3')
>>> scipy.__version__ '0.7.1'
>>> numpy.__version__ '1.4.0'
C:\>gfortran -dumpversion
4.7.0
C:\Python26\Lib\site-packages\numpy\f2py>f2py.py -c --help-fcompiler
Traceback (most recent call last):
File "C:\Python26\Scripts\f2py.py", line 24, in <module>
main()
File "C:\Python26\lib\site-packages\numpy\f2py\f2py2e.py", line 557,
in main
run_compile()
File "C:\Python26\lib\site-packages\numpy\f2py\f2py2e.py", line 543,
in run_compile
setup(ext_modules = [ext])
File "C:\Python26\lib\site-packages\numpy\distutils\core.py", line
186, in setup
return old_setup(**new_attr)
File "C:\Python26\lib\distutils\core.py", line 138, in setup
ok = dist.parse_command_line()
File "C:\Python26\lib\distutils\dist.py", line 460, in parse_command_line
args = self._parse_command_opts(parser, args)
File "C:\Python26\lib\distutils\dist.py", line 574, in
_parse_command_opts
func()
File
"C:\Python26\lib\site-packages\numpy\distutils\command\config_compiler.py",
line 13, in show_fortran_compilers
show_fcompilers(dist)
File
"C:\Python26\lib\site-packages\numpy\distutils\fcompiler\__init__.py",
line 855, in show_fcompilers
c.customize(dist)
File
"C:\Python26\lib\site-packages\numpy\distutils\fcompiler\__init__.py",
line 525, in customize
self.set_libraries(self.get_libraries())
File
"C:\Python26\lib\site-packages\numpy\distutils\fcompiler\gnu.py", line
306, in get_libraries
raise NotImplementedError("Only MS compiler supported with gfortran
on win64")
NotImplementedError: Only MS compiler supported with gfortran on win64
Could someone help me to resolve this?
Thanks, -- jv

Hello,
I am sure this question has been answered before but I can't find the right
search word to find it.
Why does
MuY += MuY.transpose()
and
MuY = MuY + MuY.transpose()
give different answers?
thanks
/Jonas Wallin

Greetings,
Is there a particular reason why a list of lists can't be passed in to create a recarray given a particular dtype?
A list of tuples works fine. I keep getting bitten by this and was thinking it should be an easy check/convert for an allowance for a row to be a list _or_ a tuple?
Here's a session:
~~~~~~~~~~
In [2]: import numpy as np
In [3]: dt = np.dtype({'names':['a', 'b', 'c'], 'formats':[float]*3})
In [4]: dt
Out[4]: dtype([('a', '<f8'), ('b', '<f8'), ('c', '<f8')])
In [5]: rows = [[1,2,3],[2,3,4],[3,4,5]]
In [6]: ary = np.array(rows, dtype=dt)
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
/Users/travis/git/trading/<ipython-input-6-b69b5c361254> in <module>()
----> 1 ary = np.array(rows, dtype=dt)
TypeError: expected a readable buffer object
In [7]: rows2 = [tuple(row) for row in rows]
In [8]: ary = np.array(rows2, dtype=dt)
In [9]: ary
Out[9]:
array([(1.0, 2.0, 3.0), (2.0, 3.0, 4.0), (3.0, 4.0, 5.0)],
dtype=[('a', '<f8'), ('b', '<f8'), ('c', '<f8')])
~~~~~~~~~~
Thoughts?
Best,
Travis

It seems that numpy universal functions only apply to ndarray (or dense
matrix). Is there a way to apply them to scipy sparse matrices also?
For example, suppose S is an large sparse matrix (lil_matrix format,
dtype=np.float). I want to get another sparse matrix B (of the same shape)
that represents the signs of corresponding entries of S.
I wrote down "B=np.sign(S)" first, but it did not give me the desired
output. I realized that np.sign() might not work for a sparse matrix, so I
have to convert S to a dense matrix, i.e.
B = np.sign( S.todense() )
However, converting a large sparse matrix to dense would easily eat up the
memory. Is there a way for np.sign (as well as other ufunc) to take a sparse
matrix as parameter, and return a sparse matrix?
(If I recall correctly, in Matlab all functions work on both dense matrices
and sparse matrices.)
--
Pengkui

ESCO 2012 - European Seminar on Coupled Problems
=================================================
ESCO2012 http://esco2012.femhub.com/ is the 3rd event in a series of
interdisciplineary meetings dedicated to computational science challenges
in multi-physics and PDEs.
I was invited as ESCO last year. It was an aboslute pleasure, because it
is a small conference that is very focused on discussions. I learned a
lot and could sit down with people who code top notch PDE libraries such
as FEniCS and have technical discussions. Besides, it is hosted in the
historical brewery where the Pilsner was invented. Plenty of great beer.
Application areas
------------------
Theoretical results as well as applications are welcome. Application
areas include, but are not limited to: Computational electromagnetics,
Civil engineering, Nuclear engineering, Mechanical engineering,
Computational fluid dynamics, Computational geophysics, Geomechanics and
rock mechanics, Computational hydrology, Subsurface modeling,
Biomechanics, Computational chemistry, Climate and weather modeling, Wave
propagation, Acoustics, Stochastic differential equations, and
Uncertainty quantification.
Minisymposia
* Multiphysics and Multiscale Problems in Civil Engineering
* Modern Numerical Methods for ODE
* Porous Media Hydrodynamics
* Nuclear Fuel Recycling Simulations
* Adaptive Methods for Eigenproblems
* Discontinuous Galerkin Methods for Electromagnetics
* Undergraduate Projects in Technical Computing
Software afternoon
-------------------
Important part of each ESCO conference is a software afternoon featuring
software projects by participants. Presented can be any computational
software that has reached certain level of maturity, i.e., it is used
outside of the author's institution, and it has a web page and a user
documentation.
Proceedings
-----------
For each ESCO we strive to reserve a special issue of an international
journal with impact factor. Proceedings of ESCO 2008 appeared in Math.
Comput. Simul., proceedings of ESCO 2010 in CiCP and Appl. Math. Comput.
Proceedings of ESCO 2012 will appear in Computing.
Important Dates
* December 15, 2011: Abstract submission deadline.
* December 15, 2011: Minisymposia proposals.
* January 15, 2012: Notification of acceptance.
PyHPC: Python for High performance computing
--------------------------------------------
If you are doing super computing, SC11, (
http://sc11.supercomputing.org/) the Super Computing conference is the
reference conference. This year there will a workshop on high performance
computing with Python: PyHPC
(http://www.dlr.de/sc/desktopdefault.aspx/tabid-1183/1638_read-31733/).
At the scipy conference, I was having a discussion with some of the
attendees on how people often still do process management and I/O with
Fortran in the big computing environment. This is counter productive.
However, has success stories of supercomputing folks using high-level
languages are not advertized, this is bound to stay. Come and tell us
how you use Python for high performance computing!
Topics
* Python-based scientific applications and libraries
* High performance computing
* Parallel Python-based programming languages
* Scientific visualization
* Scientific computing education
* Python performance and language issues
* Problem solving environments with Python
* Performance analysis tools for Python application
Papers
We invite you to submit a paper of up to 10 pages via the submission
site. Authors are encouraged to use IEEE two column format.
Important Dates
* Full paper submission: September 19, 2011
* Notification of acceptance: October 7, 2011
* Camera-ready papers: October 31, 2011

Hi,
There's a test failure in scipy/io/matlab/mio_utils that shows up with numpy
master but not 1.5.1, see http://projects.scipy.org/scipy/ticket/1512
I have a fix here:
https://github.com/rgommers/scipy/commit/4ade7829649b9e2c251f5f7f370781b16f…,
but I don't really understand why the code is failing in the first
place.
This is the relevant part:
- arr = np.squeeze(arr)
- if not arr.shape and arr.dtype.isbuiltin: # 0d coverted to scalar
- return arr.item()
- return arr
+ arr2 = np.squeeze(arr)
+ if (not arr2.shape) and arr2.dtype.isbuiltin: # 0d coverted to scalar
+ return arr2.item()
+ return arr2
All it does is rename arr to arr2. It fails with both Cython 0.13 and 0.15.
Any idea?
Ralf

Hi,
Is there a recommended way to run the numpy test suite as a buildbot
test? Just run ad python -c "import numpy; numpy.test" as ShellCommand
object?
Thanks,
Chris

Hi all,
Let's say C1 is a 3D array,
and q0 and k are 2D array.
dim C1 = nx*ny*nz
dim q0 = nx*ny = dim k
I have to do the following:
q0[0, 0] = C1[0, 0, k[0, 0]]
q0[1, 1] = C1[1, 1, k[1, 1]]
...
q0[i, j] = C1[i, j, k[i, j]]
...
I tried
q0 = C1[:, :, k]
but this obviously does not work.
How could I do this ala NumPy?
TIA
Cheers,
--
Fred