[Numpy-discussion] Time to fix ticket #390?
Questions about ticket #390http://projects.scipy.org/scipy/numpy/ticket/390: 1. Should we fix this for 1.2? 2. Is the attached patch the correct fix for this? Chuck Index: records.py === --- records.py (revision 5321) +++ records.py (working copy) @@ -309,6 +309,10 @@ return obj.view(ndarray) return obj +def __repr__(self) : +ret = ndarray.__repr__(self) +return ret.replace(rec, rec.) + def field(self, attr, val=None): if isinstance(attr, int): names = ndarray.__getattribute__(self,'dtype').names ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion
Re: [Numpy-discussion] Time to fix ticket #390?
Charles R Harris wrote: Questions about ticket #390 http://projects.scipy.org/scipy/numpy/ticket/390 : 1. Should we fix this for 1.2? +1 2. Is the attached patch the correct fix for this? It looks good, except for the rare case where the array contains the word rec Perhaps the fix should be changed to only replace the rec only at the first of the string to rec. -Travis ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion
Re: [Numpy-discussion] Time to fix ticket #390?
On Sat, Jun 28, 2008 at 7:16 PM, Travis E. Oliphant [EMAIL PROTECTED] wrote: Charles R Harris wrote: Questions about ticket #390 http://projects.scipy.org/scipy/numpy/ticket/390 : 1. Should we fix this for 1.2? +1 2. Is the attached patch the correct fix for this? It looks good, except for the rare case where the array contains the word rec Perhaps the fix should be changed to only replace the rec only at the first of the string to rec. Good point. Chuck ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion
[Numpy-discussion] numpy.distutils problem with py2app/py2exe?
Hello all, I've noticed that py2app and py2exe work strangely on my project, which (having fortran code) is driven by the numpy distutils. Now, these two distutils commands need to peek into the build/lib. [whatever] directories to grab the files to package up. Indeed, the docs for py2exe and py2app say that the build directories are automatically added to the path. However, I found that for my project, I need to explicitly add lines to the setup.py file like: if have_py2exe: sys.path.insert(0, './build/lib.win32-%d.%d'%(sys.version_info[0], sys.version_info[1])) I got around to digging a little deeper, and at least in the py2app case, py2app distutils Command subclass gets the build dir information as follows: def run(self): build = self.reinitialize_command('build') build.run() [... snip ...] extra_paths.extend([build.build_platlib, build.build_lib]) Now, when I run py2app, the build.build_platlib and build.build_lib values are None. So py2app never finds the library directory, and thus packages the files incorrectly. Is this likely to be (a) a problem in numpy.distutils, (b) a problem with my local setup, or (c) a problem with py2app? Any thoughts? Zach ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion