Re: [Numpy-discussion] Numpy RC1 build blows up -- IGNORE
Ignore this query -- silly mistake on my part. Sorry. On Sep 25, 2006, at 2:30 PM, [EMAIL PROTECTED] wrote: > I've just tried building RC1 on OSX 10.4 (Intel), and it fails > almost immediately. This did not fail in the past with beta5 or > from SVN: > > Osoyoos:~/Development/numpy-1.0rc1 chris$ python setup.py build > Running from numpy source directory. > F2PY Version 2_3198 > blas_opt_info: > FOUND: > extra_link_args = ['-Wl,-framework', '-Wl,Accelerate'] > define_macros = [('NO_ATLAS_INFO', 3)] > extra_compile_args = ['-msse3', '-I/System/Library/Frameworks/ > vecLib.framework/Headers'] > > lapack_opt_info: > FOUND: > extra_link_args = ['-Wl,-framework', '-Wl,Accelerate'] > define_macros = [('NO_ATLAS_INFO', 3)] > extra_compile_args = ['-msse3'] > > running build > running config_fc > running build_src > building py_modules sources > creating build > creating build/src.darwin-8.7.1-i386-2.4 > creating build/src.darwin-8.7.1-i386-2.4/numpy > creating build/src.darwin-8.7.1-i386-2.4/numpy/distutils > building extension "numpy.core.multiarray" sources > creating build/src.darwin-8.7.1-i386-2.4/numpy/core > Generating build/src.darwin-8.7.1-i386-2.4/numpy/core/config.h > customize NAGFCompiler > customize AbsoftFCompiler > customize IbmFCompiler > Could not locate executable g77 > Could not locate executable f77 > Could not locate executable f95 > customize GnuFCompiler > customize Gnu95FCompiler > customize Gnu95FCompiler > customize Gnu95FCompiler using config > C compiler: gcc -fno-strict-aliasing -Wno-long-double -no-cpp- > precomp -mno-fused-madd -fPIC -fno-common -dynamic -DNDEBUG -g -O3 - > Wall -Wstrict-prototypes > > compile options: '-I/Library/Frameworks/Python.framework/Versions/ > 2.4/include/python2.4 -Inumpy/core/src -Inumpy/core/include -I/ > Library/Frameworks/Python.framework/Versions/2.4/include/python2.4 -c' > gcc: _configtest.c > gcc: installation problem, cannot exec `cc1': No such file or > directory > gcc: installation problem, cannot exec `cc1': No such file or > directory > failure. > removing: _configtest.c _configtest.o > Traceback (most recent call last): > File "setup.py", line 89, in ? > setup_package() > File "setup.py", line 82, in setup_package > configuration=configuration ) > File "/Users/chris/Development/numpy-1.0rc1/numpy/distutils/ > core.py", line 174, in setup > return old_setup(**new_attr) > File "/Library/Frameworks/Python.framework/Versions/2.4/lib/ > python2.4/distutils/core.py", line 149, in setup > dist.run_commands() > File "/Library/Frameworks/Python.framework/Versions/2.4/lib/ > python2.4/distutils/dist.py", line 946, in run_commands > self.run_command(cmd) > File "/Library/Frameworks/Python.framework/Versions/2.4/lib/ > python2.4/distutils/dist.py", line 966, in run_command > cmd_obj.run() > File "/Library/Frameworks/Python.framework/Versions/2.4/lib/ > python2.4/distutils/command/build.py", line 112, in run > self.run_command(cmd_name) > File "/Library/Frameworks/Python.framework/Versions/2.4/lib/ > python2.4/distutils/cmd.py", line 333, in run_command > self.distribution.run_command(command) > File "/Library/Frameworks/Python.framework/Versions/2.4/lib/ > python2.4/distutils/dist.py", line 966, in run_command > cmd_obj.run() > File "/Users/chris/Development/numpy-1.0rc1/numpy/distutils/ > command/build_src.py", line 87, in run > self.build_sources() > File "/Users/chris/Development/numpy-1.0rc1/numpy/distutils/ > command/build_src.py", line 106, in build_sources > self.build_extension_sources(ext) > File "/Users/chris/Development/numpy-1.0rc1/numpy/distutils/ > command/build_src.py", line 212, in build_extension_sources > sources = self.generate_sources(sources, ext) > File "/Users/chris/Development/numpy-1.0rc1/numpy/distutils/ > command/build_src.py", line 270, in generate_sources > source = func(extension, build_dir) > File "numpy/core/setup.py", line 50, in generate_config_h > raise "ERROR: Failed to test configuration" > ERROR: Failed to test configuration > > -- > Christopher Fonnesbeck > + Atlanta, GA > + fonnesbeck at mac.com > + Contact me on AOL IM using email address > > -- Christopher Fonnesbeck + Atlanta, GA + fonnesbeck at mac.com + Contact me on AOL IM using email address - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV ___ Numpy-discussion mailing list Numpy-discussion@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/numpy-discussion
Re: [Numpy-discussion] Numpy RC1 build blows up
[EMAIL PROTECTED] wrote: > I've just tried building RC1 on OSX 10.4 (Intel), and it fails almost > immediately. This did not fail in the past with beta5 or from SVN: It looks like a problem on your end: > gcc: installation problem, cannot exec `cc1': No such file or directory Can you build anything else with gcc? -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV ___ Numpy-discussion mailing list Numpy-discussion@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/numpy-discussion
[Numpy-discussion] Numpy RC1 build blows up
I've just tried building RC1 on OSX 10.4 (Intel), and it fails almost immediately. This did not fail in the past with beta5 or from SVN: Osoyoos:~/Development/numpy-1.0rc1 chris$ python setup.py build Running from numpy source directory. F2PY Version 2_3198 blas_opt_info: FOUND: extra_link_args = ['-Wl,-framework', '-Wl,Accelerate'] define_macros = [('NO_ATLAS_INFO', 3)] extra_compile_args = ['-msse3', '-I/System/Library/Frameworks/ vecLib.framework/Headers'] lapack_opt_info: FOUND: extra_link_args = ['-Wl,-framework', '-Wl,Accelerate'] define_macros = [('NO_ATLAS_INFO', 3)] extra_compile_args = ['-msse3'] running build running config_fc running build_src building py_modules sources creating build creating build/src.darwin-8.7.1-i386-2.4 creating build/src.darwin-8.7.1-i386-2.4/numpy creating build/src.darwin-8.7.1-i386-2.4/numpy/distutils building extension "numpy.core.multiarray" sources creating build/src.darwin-8.7.1-i386-2.4/numpy/core Generating build/src.darwin-8.7.1-i386-2.4/numpy/core/config.h customize NAGFCompiler customize AbsoftFCompiler customize IbmFCompiler Could not locate executable g77 Could not locate executable f77 Could not locate executable f95 customize GnuFCompiler customize Gnu95FCompiler customize Gnu95FCompiler customize Gnu95FCompiler using config C compiler: gcc -fno-strict-aliasing -Wno-long-double -no-cpp-precomp -mno-fused-madd -fPIC -fno-common -dynamic -DNDEBUG -g -O3 -Wall - Wstrict-prototypes compile options: '-I/Library/Frameworks/Python.framework/Versions/2.4/ include/python2.4 -Inumpy/core/src -Inumpy/core/include -I/Library/ Frameworks/Python.framework/Versions/2.4/include/python2.4 -c' gcc: _configtest.c gcc: installation problem, cannot exec `cc1': No such file or directory gcc: installation problem, cannot exec `cc1': No such file or directory failure. removing: _configtest.c _configtest.o Traceback (most recent call last): File "setup.py", line 89, in ? setup_package() File "setup.py", line 82, in setup_package configuration=configuration ) File "/Users/chris/Development/numpy-1.0rc1/numpy/distutils/ core.py", line 174, in setup return old_setup(**new_attr) File "/Library/Frameworks/Python.framework/Versions/2.4/lib/ python2.4/distutils/core.py", line 149, in setup dist.run_commands() File "/Library/Frameworks/Python.framework/Versions/2.4/lib/ python2.4/distutils/dist.py", line 946, in run_commands self.run_command(cmd) File "/Library/Frameworks/Python.framework/Versions/2.4/lib/ python2.4/distutils/dist.py", line 966, in run_command cmd_obj.run() File "/Library/Frameworks/Python.framework/Versions/2.4/lib/ python2.4/distutils/command/build.py", line 112, in run self.run_command(cmd_name) File "/Library/Frameworks/Python.framework/Versions/2.4/lib/ python2.4/distutils/cmd.py", line 333, in run_command self.distribution.run_command(command) File "/Library/Frameworks/Python.framework/Versions/2.4/lib/ python2.4/distutils/dist.py", line 966, in run_command cmd_obj.run() File "/Users/chris/Development/numpy-1.0rc1/numpy/distutils/ command/build_src.py", line 87, in run self.build_sources() File "/Users/chris/Development/numpy-1.0rc1/numpy/distutils/ command/build_src.py", line 106, in build_sources self.build_extension_sources(ext) File "/Users/chris/Development/numpy-1.0rc1/numpy/distutils/ command/build_src.py", line 212, in build_extension_sources sources = self.generate_sources(sources, ext) File "/Users/chris/Development/numpy-1.0rc1/numpy/distutils/ command/build_src.py", line 270, in generate_sources source = func(extension, build_dir) File "numpy/core/setup.py", line 50, in generate_config_h raise "ERROR: Failed to test configuration" ERROR: Failed to test configuration -- Christopher Fonnesbeck + Atlanta, GA + fonnesbeck at mac.com + Contact me on AOL IM using email address - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV ___ Numpy-discussion mailing list Numpy-discussion@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/numpy-discussion
Re: [Numpy-discussion] NumPy types --> Numeric typecodes map?
Francesc Altet wrote: >El dl 25 de 09 del 2006 a les 11:08 -0600, en/na Travis Oliphant va >escriure: > > >>Francesc Altet wrote: >> >> >> >>>Hi, >>> >>>Anybody know if there is a map between NumPy types and Numeric >>>typecodes? Something like 'typecodes' for numarray: >>> >>> Oh, you mean actual Numeric typecodes, not Numeric-like typecodes :-) dtype(obj).char will not work for the Numeric typecodes that changed, set up a dictionary-like object which uses dtype(obj).char on all but the ones that changed is my suggestion. See the core/numerictypes.py module for dictionary-like objects. Perhaps this would be a good thing to add to numpy/oldnumeric 'b' --> 'B' '1' --> 'b' 's' --> 'h' 'w' --> 'H' 'u' --> 'I' -Travis - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV ___ Numpy-discussion mailing list Numpy-discussion@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/numpy-discussion
Re: [Numpy-discussion] NumPy types --> Numeric typecodes map?
El dl 25 de 09 del 2006 a les 11:08 -0600, en/na Travis Oliphant va escriure: > Francesc Altet wrote: > > >Hi, > > > >Anybody know if there is a map between NumPy types and Numeric > >typecodes? Something like 'typecodes' for numarray: > > > > > How about > > dtype(obj).char? This doesn't work for many types: >>> Numeric.array([1], typecode=numpy.dtype('int32').char) array([1]) this is fine, but: >>> Numeric.array([1], typecode=numpy.dtype('int16').char) Traceback (most recent call last): File "", line 1, in ? TypeError: typecode argument must be a valid type. >>> Numeric.array([1], typecode=numpy.dtype('int64').char) Traceback (most recent call last): File "", line 1, in ? TypeError: typecode argument must be a valid type. Anyway, this is not very important as I can do my own map internally. Thanks, -- >0,0< Francesc Altet http://www.carabos.com/ V V Cárabos Coop. V. Enjoy Data "-" - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV ___ Numpy-discussion mailing list Numpy-discussion@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/numpy-discussion
Re: [Numpy-discussion] NumPy types --> Numeric typecodes map?
Francesc Altet wrote: >Hi, > >Anybody know if there is a map between NumPy types and Numeric >typecodes? Something like 'typecodes' for numarray: > > How about dtype(obj).char? -Travis - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV ___ Numpy-discussion mailing list Numpy-discussion@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/numpy-discussion
[Numpy-discussion] NumPy types --> Numeric typecodes map?
Hi, Anybody know if there is a map between NumPy types and Numeric typecodes? Something like 'typecodes' for numarray: >>> numarray.typecode {'UInt64': 'U', 'Int32': 'i', 'Int16': 's', 'Float64': 'd', 'Object': 'O', 'UInt8': 'b', 'UInt32': 'u', 'Complex64': 'D', 'UInt16': 'w', 'Bool': 'B', 'Complex32': 'F', 'Int64': 'N', 'Int8': '1', 'Float32': 'f'} Thanks, -- >0,0< Francesc Altet http://www.carabos.com/ V V Cárabos Coop. V. Enjoy Data "-" - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV ___ Numpy-discussion mailing list Numpy-discussion@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/numpy-discussion
Re: [Numpy-discussion] please restore the way dtype prints to original version
Christopher Hanley wrote: > Hi, > > Change set 3213 changed the data type printing with an array from > something like dtype=int64 to dtype='int64'. Although this is a small > cosmetic change it has broken all of the doctests I have written for > numpy code. I was changing the way dtypes print and this was an unexpected consequence. It has been restored. Please try r3215 -Travis - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV ___ Numpy-discussion mailing list Numpy-discussion@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/numpy-discussion
[Numpy-discussion] Negative division and numpy scalars
Hi, I have been bitten by a subtlety in numpy scalar divisions. The next exposes the issue: >>> -1/20 -1 >>> Numeric.array([-1])[0] / Numeric.array([20])[0] -1 >>> numarray.array([-1])[0] / numarray.array([20])[0] -1 >>> numpy.array([-1])[0] / numpy.array([20])[0] 0 After some digging, I've found that Python and C follow different conventions for doing this negative division: Python do a floor of the result, while C truncates it. As numpy scalar operations seems to be implemented in C, it seems that it follows the C convention and truncates the result. In fact, I like this behaviour of NumPy scalars (at least, when I'm aware of it!), but I thought it would be nice to warn other people about that. Cheers, -- >0,0< Francesc Altet http://www.carabos.com/ V V Cárabos Coop. V. Enjoy Data "-" - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV ___ Numpy-discussion mailing list Numpy-discussion@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/numpy-discussion
[Numpy-discussion] Downcasting to smallest storage
Hi, I am sorry if I have missed anything obvious here, but is there a fast simple way to downcast an array to the smallest storage that hold array data within a specified precision - e.g. a = array([1.0]) small_a = fantasy_function(a, rtol=1.0001e-05, atol=1e-08 ) b = array([1.2]) small_b = fantasy_function(b, tol=1.0001e-05, atol=1e-08) where a.dtype becomes, say, uint8, and b.dtype becomes float32? Thanks a lot, Matthew - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV ___ Numpy-discussion mailing list Numpy-discussion@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/numpy-discussion
Re: [Numpy-discussion] 無料
:―― INFORMATION ―: 不正・悪質なサイトを一切排除しておりますので 安心してご利用ください。 http://love-match.bz/pc/?09 :――: *・゜゜・*:.。. .。.:*・゜゜・*:.。..。:*・゜゜・*:.。..。:**・゜゜・* お金と時間を持て余している人妻の間で、噂になってるあのサイト [登録・利用料全て無料] http://love-match.bz/pc/?09 ━━━ □■ 不倫・ワリキリ専門の無料出会いサイト『Love☆Match』 - 登録料・利用料 ・【無料】 メールの送受信 ・【無料】 ユーザーの検索 ・【無料】 掲示板の閲覧・書込み ・・【無料】 画像交換・アップロード ・【無料】 アドレス交換・電話番号交換 ・・・【無料】 - どれだけ使っても全て無料! http://love-match.bz/pc/?09 ━━━ □■ いつでも女性ユーザーがいっぱい。その理由は? - PC&モバイルに対応!いつでもどこでも気軽に楽しめる! - 仕事中は携帯電話から、プライベートは自宅からのんびりと。 気になる相手といつでも繋がっているから、新密度も急速にUP。 http://love-match.bz/pc/?09 - PCから簡単プロフィール作成。ネット初心者でもラクラク参加OK - 面倒な登録は一切不要。パソコンから簡単なプロフィールを作成して 初心者の方や女性でもすぐに参加できます。 http://love-match.bz/pc/?09 - 自由恋愛対応!直電・直メ交換支援ツール - 基本的にメールアドレスや電話番号は非公開ですが 仲良くなった人だけにメールアドレスや電話番号を教える事ができます。 http://love-match.bz/pc/?09 - 写真アップロードに対応!好みの相手を素早くCHECK! - 待ち合わせ場所にイメージとまったく違う人が来たら…。 ピュアックスなら会う前に写真交換ができるから、そんな不安も解消。 http://love-match.bz/pc/?09 - スレッド掲示板で秘密のパートナー検索も効率UP! - メインの掲示板のほかにスレッド型の掲示板を設置。 メル友から秘密のパートナーまで目的別のユーザーが集う掲示板です。 http://love-match.bz/pc/?09 ━━━ □■ 毎日500人近くのユーザーが続々参加中!! □- リエ(21歳/会社員) いつも1人でエッチなことを考えてます。 メールだといろいろ話せるんだけど、実際に会うとあまりしゃべれなく なっちゃうので、盛り上げてくれるような楽しい男の人いないかな? 引っ込み思案のせいか、男性経験はあまり無いんです。 優しく&楽しくリードしてくれる男性からのメール待ってます。 [写真有り] http://love-match.bz/pc/?09 □- 真菜(24歳/フリーター) 彼氏が浮気してて超アタマきたっ!まなだって遊びたい盛りだし、ずっと ガマンしてたのにさ!かっこいい人見つけて思いっきりふってやるつもりで 登録してみた(笑) [写真有り] http://love-match.bz/pc/?09 □- みさ(34歳/専業主婦) 殆ど家に帰ってこない仕事人間のだんなさまと二人きりの毎日で、ほんと 寂しい思いをしています。年下の男の子がいれば仲良くなりたいな。 年下の人とは付き合ったことがないので興味津々です(^^) [写真無し] http://love-match.bz/pc/?09 □- 恭子(28歳/会社員) 彼氏とはいつも同じようなセックスばかりでかなり冷め気味です。 誰かあたしと熱いセックスを楽しみませんか?めんどくさい事は 言いません。ただ、いつもと違うドキドキするような事がしたい だけなんです。 [写真無し] http://love-match.bz/pc/?09 □- ななこ(28歳/主婦) 半年前にだんなと別れて今は×1です。 夜のお仕事なので、昼間まったりと過ごしませんか? 心身ともに疲れ気味で、今、激しく癒されたいです。 [写真有り] http://love-match.bz/pc/?09 □- 祥子(31歳/クリエイター) 平日は18時くらいまでは大体仕事してるので、その後に食事したり 楽しく飲んだりできるパートナー希望です。年上でも年下でも かまいませんので気軽にメールを送って頂けると嬉しいです。 [写真有り] http://love-match.bz/pc/?09 □- ゅヵ`(20歳/学生) まずゎ会ってみないとはじまらなぃょね?! 横浜近辺の人で、いろんな意味でオトナな人は プロフ付きでめぇる送って☆ [写真有り] http://love-match.bz/pc/?09 □- 出会いサイトのサクラに騙されないように↓ ┏━━━┓ 【裏】無料の出会い情報 - お金と時間を持て余している人妻の間で、噂になってるあのサイト [登録・利用料全て無料] http://love-match.bz/pc/?09 - 彼女達が求めているのはこんな男性です。 ?年上女性にリードしてもらいたい、経験少なめの男性 ?体力・テクニックに自信が有る男性 男性会員が不足しています。我こそは、と思う方は今すぐ参加! [登録・利用料全て無料] http://love-match.bz/pc/?09 ┗━━━┛ 広東省茂名市人民大街3-6-4-533 友誼網絡公司 139-3668-7892 - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV ___ Numpy-discussion mailing list Numpy-discussion@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/numpy-discussion
[Numpy-discussion] please restore the way dtype prints to original version
Hi, Change set 3213 changed the data type printing with an array from something like dtype=int64 to dtype='int64'. Although this is a small cosmetic change it has broken all of the doctests I have written for numpy code. I expect that I am not the only person this change has caught. Please restore the previous behavior until after the 1.0 release at least. Thank you, Chris - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV ___ Numpy-discussion mailing list Numpy-discussion@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/numpy-discussion
[Numpy-discussion] Fixes to numexpr string support
Hi all, these are just a couple of small fixes to the string support in Numexpr, and a test case for the string copy operation. For the base patches: 1.http://www.mail-archive.com/numpy-discussion@lists.sourceforge.net/msg01551.html 2.http://www.mail-archive.com/numpy-discussion@lists.sourceforge.net/msg02261.html Cheers, :: Ivan Vilata i Balaguer >qo< http://www.carabos.com/ Cárabos Coop. V. V V Enjoy Data "" Index: numexpr/tests/test_numexpr.py === --- numexpr/tests/test_numexpr.py.orig +++ numexpr/tests/test_numexpr.py @@ -326,10 +326,22 @@ self.assertEqual(resnx.dtype.name, 'int64') class test_strings(NumpyTestCase): -str_array1 = array(['foo', 'bar', '', ' ']) -str_array2 = array(['foo', '', 'x', ' ']) +BLOCK_SIZE1 = 128 +BLOCK_SIZE2 = 8 +str_list1 = ['foo', 'bar', '', ' '] +str_list2 = ['foo', '', 'x', ' '] +str_nloops = len(str_list1) * (BLOCK_SIZE1 + BLOCK_SIZE2 + 1) +str_array1 = array(str_list1 * str_nloops) +str_array2 = array(str_list2 * str_nloops) str_constant = 'doodoo' +def check_compare_copy(self): +sarr = self.str_array1 +expr = 'sarr' +res1 = eval(expr) +res2 = evaluate(expr) +assert_array_equal(res1, res2) + def check_compare_array(self): sarr1 = self.str_array1 sarr2 = self.str_array2 Index: numexpr/interpreter.c === --- numexpr/interpreter.c.orig +++ numexpr/interpreter.c @@ -317,6 +317,7 @@ break; case OP_COPY_SS: if (n == 0 || n == 1) return 's'; + break; case OP_PROD_IIN: case OP_SUM_IIN: if (n == 0 || n == 1) return 'i'; @@ -1216,7 +1217,8 @@ Py_INCREF(PyArray_DESCR(a)); PyObject *b = PyArray_SimpleNewFromDescr(1, dims, PyArray_DESCR(a)); if (!b) goto cleanup_and_exit; -self->memsteps[i+1] = self->memsizes[i+1] = PyArray_ITEMSIZE(a); +self->memsteps[i+1] = 0; +self->memsizes[i+1] = PyArray_ITEMSIZE(a); PyTuple_SET_ITEM(a_inputs, i+2*n_inputs, b); /* steals reference */ inputs[i] = PyArray_DATA(b); if (typecode == PyArray_BOOL) { signature.asc Description: OpenPGP digital signature - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV___ Numpy-discussion mailing list Numpy-discussion@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/numpy-discussion