Re: [Numpy-discussion] A Foundation for the support of NumPy and SciPy

2011-10-04 Thread Jason Grout
On 10/4/11 6:36 PM, Nathaniel Smith wrote:
> TL;DR: When it comes to legal matters: starting your own non-profit is
> to joining an existing umbrella non-profit as CVS is to git. (And in
> fact git is also a SF Conservancy member.)

Good point.  William has a Sage Foundation set up through University of 
Washington, and UW (IIRC) handles all of these details.  I think it has 
worked out well (though, of course, William is the one to ask).

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


Re: [Numpy-discussion] A Foundation for the support of NumPy and SciPy

2011-10-04 Thread Travis Oliphant
This is a great suggestion. Thank you!

It is definitely worth careful consideration. 

-Travis



On Oct 4, 2011, at 6:36 PM, Nathaniel Smith wrote:

> [Does the group actually exist yet? Google says: "No groups match
> fastecuhla." Replying here instead...]
> 
> I've been following discussions around non-profit incorporation for
> FOSS projects for about a decade (including some years on the internal
> mailing list for SPI Inc. -- Debian's non-profit foundation). My
> strong recommendation is that we not do it ourselves. Setting up our
> own non-profit takes an immense amount of energy, and keeping it going
> requires continuing to jump through annoying hoops on a regular basis
> (you must have a procedure for selecting a board; the board must meet
> on some regular schedule, achieve quorum, and regularly elect
> officers; each board meeting must have minutes produced and approved,
> you must file taxes on time, ...), and it's expensive to boot (you'll
> need a professional accountant, etc.). As a result, most projects that
> try going it on their own end up with a horrible mess sooner or later.
> It works okay if you're, say, Gnome, but most projects are not Gnome.
> 
> But fortunately, this is a solved problem: there are several
> non-profit umbrella corporations that are set up to let experts take
> care of this nonsense and amortize the costs over multiple projects.
> The Software Freedom Conservancy is probably the most well put
> together:
>   http://www.sfconservancy.org/overview/
>   http://www.sfconservancy.org/members/services/
>   http://sfconservancy.org/about/board/
> Many large projects with complicated legal situations like Samba,
> Busybox, jQuery, Wine, Boost, ... have also chosen this approach:
>   http://www.sfconservancy.org/members/current/
> 
> TL;DR: When it comes to legal matters: starting your own non-profit is
> to joining an existing umbrella non-profit as CVS is to git. (And in
> fact git is also a SF Conservancy member.)
> 
> My $0.02,
> -- Nathaniel
> 
> On Tue, Oct 4, 2011 at 1:58 PM, Travis Oliphant  wrote:
>> Hi all,
>> 
>> At the recent US SciPy conference and at other times in the past I have been 
>> approached about the possibility of creating a foundation to support the 
>> development of SciPy and NumPy.
>> 
>> I know there are varying opinions about that, but I am generally very 
>> supportive of the idea and would like to encourage it as much as I can.   It 
>> would be interesting to have a public discussion of the issues, but these 
>> discussions should not clog the main list of either NumPy or SciPy.
>> 
>> As a result, there has been set up a public mailing list for discussion of 
>> the creation of a Foundation for the Advancement of Scientific, Technical, 
>> and Engineering Computing Using High Level Abstractions (FASTECUHLA). 
>> The list is fastecu...@googlegroups.com
>> 
>> This is a place-holder name that can be replaced if somebody comes up with a 
>> better one. Please sign up for that list if you would like to contribute 
>> to the discussion.
>> 
>> The items to discuss include:
>>* where to organize
>>* what the purposes should be
>>* who should be members
>>* where should money come from
>>* what other organizations exist that we could either piggy-back on 
>> or emulate
>>* what are the pitfalls on starting a foundation to support NumPy and 
>> SciPy versus other approaches
>>* who has time to participate in its organization and maintenance
>> 
>> One important feature is that I see this foundation as a service opportunity 
>> and obligation and not as a "feather-in-the-cap" or something to join 
>> lightly.   I'm hopeful that it can be a place where people and organizations 
>> can donate money and know that it will be going directly to further the core 
>> packages for Scientific Computing with Python.
>> 
>> Thank you,
>> 
>> -Travis
>> 
>> ___
>> 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

---
Travis Oliphant
Enthought, Inc.
oliph...@enthought.com
1-512-536-1057
http://www.enthought.com



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


Re: [Numpy-discussion] A Foundation for the support of NumPy and SciPy

2011-10-04 Thread josef . pktd
On Tue, Oct 4, 2011 at 7:36 PM, Nathaniel Smith  wrote:
> [Does the group actually exist yet? Google says: "No groups match
> fastecuhla." Replying here instead...]

https://groups.google.com/group/fastecuhla

>
> I've been following discussions around non-profit incorporation for
> FOSS projects for about a decade (including some years on the internal
> mailing list for SPI Inc. -- Debian's non-profit foundation). My
> strong recommendation is that we not do it ourselves. Setting up our
> own non-profit takes an immense amount of energy, and keeping it going
> requires continuing to jump through annoying hoops on a regular basis
> (you must have a procedure for selecting a board; the board must meet
> on some regular schedule, achieve quorum, and regularly elect
> officers; each board meeting must have minutes produced and approved,
> you must file taxes on time, ...), and it's expensive to boot (you'll
> need a professional accountant, etc.). As a result, most projects that
> try going it on their own end up with a horrible mess sooner or later.
> It works okay if you're, say, Gnome, but most projects are not Gnome.
>
> But fortunately, this is a solved problem: there are several
> non-profit umbrella corporations that are set up to let experts take
> care of this nonsense and amortize the costs over multiple projects.
> The Software Freedom Conservancy is probably the most well put
> together:
>   http://www.sfconservancy.org/overview/
>   http://www.sfconservancy.org/members/services/
>   http://sfconservancy.org/about/board/
> Many large projects with complicated legal situations like Samba,
> Busybox, jQuery, Wine, Boost, ... have also chosen this approach:
>   http://www.sfconservancy.org/members/current/
>
> TL;DR: When it comes to legal matters: starting your own non-profit is
> to joining an existing umbrella non-profit as CVS is to git. (And in
> fact git is also a SF Conservancy member.)
>
> My $0.02,
> -- Nathaniel
>
> On Tue, Oct 4, 2011 at 1:58 PM, Travis Oliphant  wrote:
>> Hi all,
>>
>> At the recent US SciPy conference and at other times in the past I have been 
>> approached about the possibility of creating a foundation to support the 
>> development of SciPy and NumPy.
>>
>> I know there are varying opinions about that, but I am generally very 
>> supportive of the idea and would like to encourage it as much as I can.   It 
>> would be interesting to have a public discussion of the issues, but these 
>> discussions should not clog the main list of either NumPy or SciPy.
>>
>> As a result, there has been set up a public mailing list for discussion of 
>> the creation of a Foundation for the Advancement of Scientific, Technical, 
>> and Engineering Computing Using High Level Abstractions (FASTECUHLA).     
>> The list is fastecu...@googlegroups.com
>>
>> This is a place-holder name that can be replaced if somebody comes up with a 
>> better one.     Please sign up for that list if you would like to contribute 
>> to the discussion.
>>
>> The items to discuss include:
>>        * where to organize
>>        * what the purposes should be
>>        * who should be members
>>        * where should money come from
>>        * what other organizations exist that we could either piggy-back on 
>> or emulate
>>        * what are the pitfalls on starting a foundation to support NumPy and 
>> SciPy versus other approaches
>>        * who has time to participate in its organization and maintenance
>>
>> One important feature is that I see this foundation as a service opportunity 
>> and obligation and not as a "feather-in-the-cap" or something to join 
>> lightly.   I'm hopeful that it can be a place where people and organizations 
>> can donate money and know that it will be going directly to further the core 
>> packages for Scientific Computing with Python.
>>
>> Thank you,
>>
>> -Travis
>>
>> ___
>> 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 mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] A Foundation for the support of NumPy and SciPy

2011-10-04 Thread Charles R Harris
On Tue, Oct 4, 2011 at 5:36 PM, Nathaniel Smith  wrote:

> [Does the group actually exist yet? Google says: "No groups match
> fastecuhla." Replying here instead...]
>
> I've been following discussions around non-profit incorporation for
> FOSS projects for about a decade (including some years on the internal
> mailing list for SPI Inc. -- Debian's non-profit foundation). My
> strong recommendation is that we not do it ourselves. Setting up our
> own non-profit takes an immense amount of energy, and keeping it going
> requires continuing to jump through annoying hoops on a regular basis
> (you must have a procedure for selecting a board; the board must meet
> on some regular schedule, achieve quorum, and regularly elect
> officers; each board meeting must have minutes produced and approved,
> you must file taxes on time, ...), and it's expensive to boot (you'll
> need a professional accountant, etc.). As a result, most projects that
> try going it on their own end up with a horrible mess sooner or later.
> It works okay if you're, say, Gnome, but most projects are not Gnome.
>
> But fortunately, this is a solved problem: there are several
> non-profit umbrella corporations that are set up to let experts take
> care of this nonsense and amortize the costs over multiple projects.
> The Software Freedom Conservancy is probably the most well put
> together:
>   http://www.sfconservancy.org/overview/
>   http://www.sfconservancy.org/members/services/
>   http://sfconservancy.org/about/board/
> Many large projects with complicated legal situations like Samba,
> Busybox, jQuery, Wine, Boost, ... have also chosen this approach:
>   http://www.sfconservancy.org/members/current/
>
> TL;DR: When it comes to legal matters: starting your own non-profit is
> to joining an existing umbrella non-profit as CVS is to git. (And in
> fact git is also a SF Conservancy member.)
>
> My $0.02,
> -- Nathaniel
>

All excellent points.



Chuck

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


Re: [Numpy-discussion] A Foundation for the support of NumPy and SciPy

2011-10-04 Thread Nathaniel Smith
[Does the group actually exist yet? Google says: "No groups match
fastecuhla." Replying here instead...]

I've been following discussions around non-profit incorporation for
FOSS projects for about a decade (including some years on the internal
mailing list for SPI Inc. -- Debian's non-profit foundation). My
strong recommendation is that we not do it ourselves. Setting up our
own non-profit takes an immense amount of energy, and keeping it going
requires continuing to jump through annoying hoops on a regular basis
(you must have a procedure for selecting a board; the board must meet
on some regular schedule, achieve quorum, and regularly elect
officers; each board meeting must have minutes produced and approved,
you must file taxes on time, ...), and it's expensive to boot (you'll
need a professional accountant, etc.). As a result, most projects that
try going it on their own end up with a horrible mess sooner or later.
It works okay if you're, say, Gnome, but most projects are not Gnome.

But fortunately, this is a solved problem: there are several
non-profit umbrella corporations that are set up to let experts take
care of this nonsense and amortize the costs over multiple projects.
The Software Freedom Conservancy is probably the most well put
together:
   http://www.sfconservancy.org/overview/
   http://www.sfconservancy.org/members/services/
   http://sfconservancy.org/about/board/
Many large projects with complicated legal situations like Samba,
Busybox, jQuery, Wine, Boost, ... have also chosen this approach:
   http://www.sfconservancy.org/members/current/

TL;DR: When it comes to legal matters: starting your own non-profit is
to joining an existing umbrella non-profit as CVS is to git. (And in
fact git is also a SF Conservancy member.)

My $0.02,
-- Nathaniel

On Tue, Oct 4, 2011 at 1:58 PM, Travis Oliphant  wrote:
> Hi all,
>
> At the recent US SciPy conference and at other times in the past I have been 
> approached about the possibility of creating a foundation to support the 
> development of SciPy and NumPy.
>
> I know there are varying opinions about that, but I am generally very 
> supportive of the idea and would like to encourage it as much as I can.   It 
> would be interesting to have a public discussion of the issues, but these 
> discussions should not clog the main list of either NumPy or SciPy.
>
> As a result, there has been set up a public mailing list for discussion of 
> the creation of a Foundation for the Advancement of Scientific, Technical, 
> and Engineering Computing Using High Level Abstractions (FASTECUHLA).     The 
> list is fastecu...@googlegroups.com
>
> This is a place-holder name that can be replaced if somebody comes up with a 
> better one.     Please sign up for that list if you would like to contribute 
> to the discussion.
>
> The items to discuss include:
>        * where to organize
>        * what the purposes should be
>        * who should be members
>        * where should money come from
>        * what other organizations exist that we could either piggy-back on or 
> emulate
>        * what are the pitfalls on starting a foundation to support NumPy and 
> SciPy versus other approaches
>        * who has time to participate in its organization and maintenance
>
> One important feature is that I see this foundation as a service opportunity 
> and obligation and not as a "feather-in-the-cap" or something to join 
> lightly.   I'm hopeful that it can be a place where people and organizations 
> can donate money and know that it will be going directly to further the core 
> packages for Scientific Computing with Python.
>
> Thank you,
>
> -Travis
>
> ___
> 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] A Foundation for the support of NumPy and SciPy

2011-10-04 Thread Travis Oliphant
Hi all,

At the recent US SciPy conference and at other times in the past I have been 
approached about the possibility of creating a foundation to support the 
development of SciPy and NumPy. 

I know there are varying opinions about that, but I am generally very 
supportive of the idea and would like to encourage it as much as I can.   It 
would be interesting to have a public discussion of the issues, but these 
discussions should not clog the main list of either NumPy or SciPy.   

As a result, there has been set up a public mailing list for discussion of the 
creation of a Foundation for the Advancement of Scientific, Technical, and 
Engineering Computing Using High Level Abstractions (FASTECUHLA). The list 
is fastecu...@googlegroups.com

This is a place-holder name that can be replaced if somebody comes up with a 
better one. Please sign up for that list if you would like to contribute to 
the discussion. 

The items to discuss include: 
* where to organize
* what the purposes should be
* who should be members
* where should money come from
* what other organizations exist that we could either piggy-back on or 
emulate
* what are the pitfalls on starting a foundation to support NumPy and 
SciPy versus other approaches
* who has time to participate in its organization and maintenance

One important feature is that I see this foundation as a service opportunity 
and obligation and not as a "feather-in-the-cap" or something to join lightly.  
 I'm hopeful that it can be a place where people and organizations can donate 
money and know that it will be going directly to further the core packages for 
Scientific Computing with Python. 
 
Thank you, 

-Travis

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


Re: [Numpy-discussion] oblique text

2011-10-04 Thread Pauli Virtanen
04.10.2011 21:10, Alexandre Leray kirjoitti:
[clip]
> But it is not very flexible. For instance, I'd like to control the "line
> spacing" (by adding extra spaces in between letters since it isn't real
> lines). I just found numpy and I have the intuition that it could do the
> job since it deals with matrices.
>
> Am I right? If so how would you do such a thing?

import numpy as np

def make_oblique(words):
 n = max(2*len(word) for word in words) + len(words)
 canvas = np.zeros((n, n), dtype='S1')
 canvas[...] = ' ' # ye mighty FORTRAN, we beseech thee

 for j, word in enumerate(words):
 i = np.arange(len(word))
 canvas[i+j, 2*i] = list(word)

 canvas[:,-1] = '\n'
 return canvas.tostring().rstrip()

-- 
Pauli Virtanen

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


[Numpy-discussion] oblique text

2011-10-04 Thread Alexandre Leray
Dear all,

I'm trying to create oblique texts by reordering their letters. Here is 
an exemple to illustrate this (to be display in a monospaced font):

 >>> text = """\
... This
... is
... a
... test"""
 >>> print(make_oblique(text))
T
i h
a s i
ts
   e
 s
   t


So far I have this:

def make_oblique(text):
 words = text.splitlines()
 matrix = [[" " for i in xrange(len(words) + len(max(words)))] \
 for j in xrange(len(words) + len(max(words)))]
 for i, word in enumerate(words):
 for j, letter in enumerate(word):
 matrix[j + i][j] = letter
 matrix = map(lambda x: "".join(x), matrix)
 return "\n".join(matrix)

But it is not very flexible. For instance, I'd like to control the "line 
spacing" (by adding extra spaces in between letters since it isn't real 
lines). I just found numpy and I have the intuition that it could do the 
job since it deals with matrices.

Am I right? If so how would you do such a thing?

Thanks!

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


Re: [Numpy-discussion] Long-standing issue with using numpy in embedded CPython

2011-10-04 Thread Yang Zhang
On Tue, Oct 4, 2011 at 1:28 AM, Robin  wrote:
> On Mon, Oct 3, 2011 at 9:42 PM, Yang Zhang  wrote:
>> It turns out that there's a long-standing problem in numpy that
>> prevents it from being used in embedded CPython environments:
>
> Just wanted to make the point for reference that in general Numpy does
> work fine in (non-threaded) embedded CPython situations, see for
> example pymex [1] which embeds Python + Numpy in a Matlab mex file and
> works really well.
>
> This seems to a be a problem specific to Jepp.
>
> Just wanted to mention it in case it puts someone off trying something
> unnecessarily in the future.

My (second-hand) understanding is that this is a problem with having
multiple CPython interpreters, which both Jepp and numpy utilize,
incompatibly - is that right?  I.e., if either one were restricted to
using a single CPython interpreter, we wouldn't see this problem?

I'm curious how to disable threads in numpy (not an ideal solution).
Googling seems to point me to setting NPY_ALLOW_THREADS to
0somewhere.

>
> Cheers
>
> Robin
>
> [1] https://github.com/kw/pymex
>
>>
>> http://stackoverflow.com/questions/7592565/when-embedding-cpython-in-java-why-does-this-hang/7630992#7630992
>> http://mail.scipy.org/pipermail/numpy-discussion/2009-July/044046.html
>> Is there any fix or workaround for this?  Thanks.
>> --
>> Yang Zhang
>> http://yz.mit.edu/
>> ___
>> 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
>



-- 
Yang Zhang
http://yz.mit.edu/
___
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] build errors

2011-10-04 Thread David Cournapeau
On Tue, Oct 4, 2011 at 11:54 AM, Miah Wadud Dr (ITCS)  wrote:
> Hello numpy users,
>
> I am trying to build numpy 1.6.1 and am having problems. It prints the 
> following error message:
>
> gcc -pthread -shared 
> build/temp.linux-x86_64-2.4/numpy/core/blasdot/_dotblas.o -L/usr/lib64/atlas 
> -Lbuild/temp.linux-x86_64-2.4 -lptf77blas -lptcblas -latlas -o 
> build/lib.linux-x86_64-2.4/numpy/core/_dotblas.so
> /usr/bin/ld: /usr/lib64/atlas/libptcblas.a(cblas_dptgemm.o): relocation 
> R_X86_64_32 against `a local symbol' can not be used when making a shared 
> object; recompile with -fPIC
> /usr/lib64/atlas/libptcblas.a: could not read symbols: Bad value
> collect2: ld returned 1 exit status
> /usr/bin/ld: /usr/lib64/atlas/libptcblas.a(cblas_dptgemm.o): relocation 
> R_X86_64_32 against `a local symbol' can not be used when making a shared 
> object; recompile with -fPIC
> /usr/lib64/atlas/libptcblas.a: could not read symbols: Bad value
> collect2: ld returned 1 exit status
> error: Command "gcc -pthread -shared 
> build/temp.linux-x86_64-2.4/numpy/core/blasdot/_dotblas.o -L/usr/lib64/atlas 
> -Lbuild/temp.linux-x86_64-2.4 -lptf77blas -lptcblas -latlas -o 
> build/lib.linux-x86_64-2.4/numpy/core/_dotblas.so" failed with exit status 1

Did you build Atlas by yourself ? If so, it is most likely not usable
for shared libraries (mandatory for any python extension, including
bumpy). You need to configure atlas with the option "-Fa alg -fPIC".

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


Re: [Numpy-discussion] should the return type of matlib.reshape be ndarray or matrix?

2011-10-04 Thread Alan G Isaac
On 10/3/2011 6:59 PM, Pengkui Luo wrote:
> Most functions in numpy return ndarray by default.
> Use numpy.asmatrix() if you want a matrix.


Please note that the example is using matlib.reshape,
not numpy.reshape.

Alan Isaac

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


[Numpy-discussion] build errors

2011-10-04 Thread Miah Wadud Dr (ITCS)
Hello numpy users,

I am trying to build numpy 1.6.1 and am having problems. It prints the 
following error message:

gcc -pthread -shared build/temp.linux-x86_64-2.4/numpy/core/blasdot/_dotblas.o 
-L/usr/lib64/atlas -Lbuild/temp.linux-x86_64-2.4 -lptf77blas -lptcblas -latlas 
-o build/lib.linux-x86_64-2.4/numpy/core/_dotblas.so
/usr/bin/ld: /usr/lib64/atlas/libptcblas.a(cblas_dptgemm.o): relocation 
R_X86_64_32 against `a local symbol' can not be used when making a shared 
object; recompile with -fPIC
/usr/lib64/atlas/libptcblas.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
/usr/bin/ld: /usr/lib64/atlas/libptcblas.a(cblas_dptgemm.o): relocation 
R_X86_64_32 against `a local symbol' can not be used when making a shared 
object; recompile with -fPIC
/usr/lib64/atlas/libptcblas.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
error: Command "gcc -pthread -shared 
build/temp.linux-x86_64-2.4/numpy/core/blasdot/_dotblas.o -L/usr/lib64/atlas 
-Lbuild/temp.linux-x86_64-2.4 -lptf77blas -lptcblas -latlas -o 
build/lib.linux-x86_64-2.4/numpy/core/_dotblas.so" failed with exit status 1

I do not know anything about the setup.py script, so do not know how to add the 
-fPIC switch. Any help will be greatly appreciated. 

Regards,

--
Wadud Miah, High Performance Computing Systems Developer
Research Computing Services, University of East Anglia
Web: http://www.uea.ac.uk/~xca10fju/
Telephone: 01603 593856

Information Services
--


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


[Numpy-discussion] Crash on (un-orthodox) __import__

2011-10-04 Thread Andrea Gavana
Hi All,

I was fiddling here and there with some code doing dynamic import of
stuff, and I noticed that this code:

import os
import sys

init_name = r"C:\Python27\Lib\site-packages\numpy\__init__.py"

directory, module_name = os.path.split(init_name)
main = os.path.splitext(module_name)[0]

sys.path.insert(0, os.path.normpath(directory))

# Crash here...
mainmod = __import__(main)


Produces a hard crash on Python (i.e., a dialog box with a "python.exe has
stopped working" message). I know I am not supposed to import stuff like
that, but I was curious to understand why Python should crash in this way.
This happens on Python 2.7.2 with Numpy 1.6.1 and Python 2.5.4 with Numpy
1.5.0

Thank you for your suggestions :-D


Andrea.

"Imagination Is The Only Weapon In The War Against Reality."
http://xoomer.alice.it/infinity77/

>>> import PyQt4.QtGui
Traceback (most recent call last):
  File "", line 1, in 
ImportError: No module named PyQt4.QtGui
>>>
>>> import pygtk
Traceback (most recent call last):
  File "", line 1, in 
ImportError: No module named pygtk
>>>
>>> import wx
>>>
>>>
___
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] Long-standing issue with using numpy in embedded CPython

2011-10-04 Thread Robin
On Mon, Oct 3, 2011 at 9:42 PM, Yang Zhang  wrote:
> It turns out that there's a long-standing problem in numpy that
> prevents it from being used in embedded CPython environments:

Just wanted to make the point for reference that in general Numpy does
work fine in (non-threaded) embedded CPython situations, see for
example pymex [1] which embeds Python + Numpy in a Matlab mex file and
works really well.

This seems to a be a problem specific to Jepp.

Just wanted to mention it in case it puts someone off trying something
unnecessarily in the future.

Cheers

Robin

[1] https://github.com/kw/pymex

>
> http://stackoverflow.com/questions/7592565/when-embedding-cpython-in-java-why-does-this-hang/7630992#7630992
> http://mail.scipy.org/pipermail/numpy-discussion/2009-July/044046.html
> Is there any fix or workaround for this?  Thanks.
> --
> Yang Zhang
> http://yz.mit.edu/
> ___
> 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