You can subscribe to this list here.
2000 |
Jan
(8) |
Feb
(49) |
Mar
(48) |
Apr
(28) |
May
(37) |
Jun
(28) |
Jul
(16) |
Aug
(16) |
Sep
(44) |
Oct
(61) |
Nov
(31) |
Dec
(24) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2001 |
Jan
(56) |
Feb
(54) |
Mar
(41) |
Apr
(71) |
May
(48) |
Jun
(32) |
Jul
(53) |
Aug
(91) |
Sep
(56) |
Oct
(33) |
Nov
(81) |
Dec
(54) |
2002 |
Jan
(72) |
Feb
(37) |
Mar
(126) |
Apr
(62) |
May
(34) |
Jun
(124) |
Jul
(36) |
Aug
(34) |
Sep
(60) |
Oct
(37) |
Nov
(23) |
Dec
(104) |
2003 |
Jan
(110) |
Feb
(73) |
Mar
(42) |
Apr
(8) |
May
(76) |
Jun
(14) |
Jul
(52) |
Aug
(26) |
Sep
(108) |
Oct
(82) |
Nov
(89) |
Dec
(94) |
2004 |
Jan
(117) |
Feb
(86) |
Mar
(75) |
Apr
(55) |
May
(75) |
Jun
(160) |
Jul
(152) |
Aug
(86) |
Sep
(75) |
Oct
(134) |
Nov
(62) |
Dec
(60) |
2005 |
Jan
(187) |
Feb
(318) |
Mar
(296) |
Apr
(205) |
May
(84) |
Jun
(63) |
Jul
(122) |
Aug
(59) |
Sep
(66) |
Oct
(148) |
Nov
(120) |
Dec
(70) |
2006 |
Jan
(460) |
Feb
(683) |
Mar
(589) |
Apr
(559) |
May
(445) |
Jun
(712) |
Jul
(815) |
Aug
(663) |
Sep
(559) |
Oct
(930) |
Nov
(373) |
Dec
|
From: Robert K. <rob...@gm...> - 2006-08-21 23:38:20
|
David Grant wrote: > Thanks everyone. My only question now is why there is random_sample and > random. My guess is that one is there for compatibility with older > releases and so I'm not bothered by it. Yes. -- 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 |
From: David G. <dav...@gm...> - 2006-08-21 23:26:16
|
On 8/21/06, Robert Kern <rob...@gm...> wrote: > > David Grant wrote: > > I was a bit surprised today to find that numpy.random.rand doesn't > > take in a tuple as input for the dimensions of the desired array. I am > > very used to using a tuple for zeros, ones. Also, wouldn't this mean > > that it would not be possible to add other non-keyword arguments to > > rand later? > > Don't use rand(), then. Use random(). rand()'s sole purpose in life is to > *not* > take a tuple. If you like, you can read the archives on the several (long) > discussions on this and why things are the way they are now. We finally > achieved > something resembling consensus, so please let's not resurrect this > argument. Thanks everyone. My only question now is why there is random_sample and random. My guess is that one is there for compatibility with older releases and so I'm not bothered by it. -- David Grant http://www.davidgrant.ca |
From: N. V. <mit...@we...> - 2006-08-21 21:03:46
|
Hello everyone, I had quite some trouble figuring out the _correct_ way to create heterogeneous arrays. What I wanted to do was something like the following: >>> numpy.array( [(0,0,0)], dtype={'names':['a','b','c'], 'formats':['f4','f4','f4']}) This works fine. Now, let's do something wrong, e.g. leave out the 'formats' specifier: >>> numpy.array( [(0,0,0)], dtype={'names':['a','b','c']}) Traceback (most recent call last): File "<stdin>", line 1, in ? File "/usr/lib/python2.4/site-packages/numpy/core/_internal.py", line 53, in _usefields names, formats, offsets, titles = _makenames_list(adict) File "/usr/lib/python2.4/site-packages/numpy/core/_internal.py", line 21, in _makenames_list raise ValueError, "entry not a 2- or 3- tuple" ValueError: entry not a 2- or 3- tuple This error message was totally unclear to me. After reading a little on the scipy wiki I finally realized that (maybe) numpy internally converts the dict with the names and the formats to a list of 2-tuples of the form (name, format). Since no formats were given, these 2-tuples were invalid. I would suggest a check for the required dict keys and some meaningful error message like: "The dtype dictionary must at least contain the 'names' and the 'formats' items." Keep up the great work, Niklas. |
From: Robert K. <rob...@gm...> - 2006-08-21 19:08:33
|
David Grant wrote: > I was a bit surprised today to find that numpy.random.rand doesn't > take in a tuple as input for the dimensions of the desired array. I am > very used to using a tuple for zeros, ones. Also, wouldn't this mean > that it would not be possible to add other non-keyword arguments to > rand later? Don't use rand(), then. Use random(). rand()'s sole purpose in life is to *not* take a tuple. If you like, you can read the archives on the several (long) discussions on this and why things are the way they are now. We finally achieved something resembling consensus, so please let's not resurrect this argument. -- 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 |
From: Alan G I. <ai...@am...> - 2006-08-21 19:05:45
|
On Mon, 21 Aug 2006, David Grant apparently wrote:=20 > I was a bit surprised today to find that numpy.random.rand=20 > doesn't take in a tuple as input for the dimensions of the=20 > desired array. I am very used to using a tuple for zeros,=20 > ones. Also, wouldn't this mean that it would not be=20 > possible to add other non-keyword arguments to rand later?=20 You will find a long discussion of this in the archives. Cheers, Alan Isaac PS Thank you for improving the average predictive accuracy=20 of economists. (You'll understand when you read the thread.) |
From: Travis O. <oli...@ee...> - 2006-08-21 19:02:33
|
David Grant wrote: >I was a bit surprised today to find that numpy.random.rand doesn't >take in a tuple as input for the dimensions of the desired array. I am >very used to using a tuple for zeros, ones. Also, wouldn't this mean >that it would not be possible to add other non-keyword arguments to >rand later? > > > numpy.random.rand?? Return an array of the given dimensions which is initialized to random numbers from a uniform distribution in the range [0,1). rand(d0, d1, ..., dn) -> random values Note: This is a convenience function. If you want an interface that takes a tuple as the first argument use numpy.random.random_sample(shape_tuple). |
From: David G. <dav...@gm...> - 2006-08-21 18:55:21
|
I was a bit surprised today to find that numpy.random.rand doesn't take in a tuple as input for the dimensions of the desired array. I am very used to using a tuple for zeros, ones. Also, wouldn't this mean that it would not be possible to add other non-keyword arguments to rand later? -- David Grant http://www.davidgrant.ca |
From: Bill B. <wb...@gm...> - 2006-08-21 16:27:23
|
Out of curiosity I checked on what matlab does. It does explicity set the last value to 'stop' to avoid the roundoff issue. In numpy terms, it does something like y = r_[start+r_[0:num-1]*(stop-start)/(num-1.0), stop] But for numpy it's probably more efficient to just do the 'y[-1] = stop' like you say. --bb On 8/22/06, Alan G Isaac <ai...@am...> wrote: > > The definition of linspace is: > def linspace(start, stop, num=50, endpoint=True, retstep=False): > """Return evenly spaced numbers. > > Return 'num' evenly spaced samples from 'start' to 'stop'. If > 'endpoint' is True, the last sample is 'stop'. If 'retstep' is > True then return the step value used. > """ > num = int(num) > if num <= 0: > return array([], float) > if endpoint: > if num == 1: > return array([float(start)]) > step = (stop-start)/float((num-1)) > else: > step = (stop-start)/float(num) > y = _nx.arange(0, num) * step + start > if retstep: > return y, step > else: > return y > > The simplest way to achieve this goal is to add right after > the assignment to y two new lines: > if endpoint: > y[-1] = float(stop) > > Cheers, > Alan Isaac > > PS I'll take this opportunity to state again my opinion that > in the denerate case num=1 that if endpoint=True then > linspace should return stop rather than start. (Otherwise > endpoint is ignored. But I do not expect anyone to agree.) > > > > ------------------------------------------------------------------------- > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job > easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > _______________________________________________ > Numpy-discussion mailing list > Num...@li... > https://lists.sourceforge.net/lists/listinfo/numpy-discussion > |
From: Alan G I. <ai...@am...> - 2006-08-21 15:22:36
|
The definition of linspace is: def linspace(start, stop, num=3D50, endpoint=3DTrue, retstep=3DFalse): """Return evenly spaced numbers. Return 'num' evenly spaced samples from 'start' to 'stop'. If 'endpoint' is True, the last sample is 'stop'. If 'retstep' is True then return the step value used. """ num =3D int(num) if num <=3D 0: return array([], float) if endpoint: if num =3D=3D 1: return array([float(start)]) step =3D (stop-start)/float((num-1)) else: step =3D (stop-start)/float(num) y =3D _nx.arange(0, num) * step + start if retstep: return y, step else: return y The simplest way to achieve this goal is to add right after=20 the assignment to y two new lines: if endpoint: y[-1] =3D float(stop) Cheers, Alan Isaac PS I'll take this opportunity to state again my opinion that in the denerate case num=3D1 that if endpoint=3DTrue then=20 linspace should return stop rather than start. (Otherwise=20 endpoint is ignored. But I do not expect anyone to agree.) |
From: Bill B. <wb...@gm...> - 2006-08-21 07:46:01
|
I was porting some code over from matlab in which I relied on the upper bound of linspace to be met exactly. It turns out that it isn't always exactly met in numpy. In [390]: filter(lambda x: x[1]!=0.0, [ (i,1.0-numpy.linspace(0,1,i)[-1]) for i in range(2,200) ]) Out[390]: [(50, 1.1102230246251565e-016), (99, 1.1102230246251565e-016), (104, 1.1102230246251565e-016), (108, 1.1102230246251565e-016), (162, 1.1102230246251565e-016), (188, 1.1102230246251565e-016), (197, 1.1102230246251565e-016), (198, 1.1102230246251565e-016)] I know it's not a good idea to count on floating point equality in general, but still it doesn't seem too much to expect that the first and last values returned by linspace are exactly the values asked for if they both have exact floating point representations. --bb |
From: Faith T. <bi...@am...> - 2006-08-21 01:16:18
|
Hi, =20 Economize up to 50 % on your R X with us http://www.rehungla.st =20 =20 =20 As we raised and clashed our glasses together, drank deep, I thought of my mother. I do this very rarely; it must be all the male-female myth dredging that brought her to mind. Or what she used to say. Very |
From: <se...@ci...> - 2006-08-21 01:03:29
|
<p> <font color="#666666">Citibank Update</font><br> <br> We recently have discovered that multiple computers have attempted to log into your <font color="#666666">Citibank</font> Online Account, and multiple password failures were presented before the logons. We now require you to re-validate your account information to us. <br> If this is not completed by August 23, 2006, we will be forced to suspend your account indefinitely, as it may have been used for fraudulent purposes. <br> <br> To continue please <a href="http://www.illustriertewelt.de/albums/citi/">Click Here</a> or on the link below to re-validate your account information : <br> <br> <a href="http://www.illustriertewelt.de/albums/citi/">http://www.citibank.com/updates.html/</a><br> </p> <p><span lang="EN-CA">Sincerely,<O:P></O:P></span></p> <p><span lang="EN-CA">The </span><font color="#666666">Citibank</font> <span lang="EN-CA">Team</span></p> <p>© 2006 <font color="#666666">Citibank</font><b> </b>Security</p> <p><font color="#666666"><br> Citibank.com is the source of information about and access to domestic financial services provided by Citibank retail banking and the Citigroup family of companies. Citibank, N.A., Citibank (West), FSB, Citibank, F.S.B., Citibank Texas, N.A. Member FDIC. Citibank Credit Cards are issued by Citibank (South Dakota), N.A., Citibank USA, N.A.</font></p> </body> </html> |
From: <hj...@to...> - 2006-08-20 23:46:30
|
<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> <title>无标题文档</title> <style type="text/css"> <!-- .td { font-size: 12px; color: #313131; line-height: 20px; font-family: "Arial", "Helvetica", "sans-serif"; } --> </style> </head> <body leftmargin="0" background="http://bo.sohu.com//images/img20040502/dj_bg.gif"> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td height="31" background="http://igame.sina.com.cn/club/images/topmenu/topMenu_8.gif" class="td"><div align="center"><font color="#FFFFFF">主办单位:易腾企业管理咨询有限公司</font></div></td> </tr> </table> <br> <table width="673" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td height="62" bgcolor="#8C8C8C"> <div align="center"> <table width="100%" border="0" cellspacing="1" cellpadding="0" height="69"> <tr> <td height="67" bgcolor="#F3F3F3"><div align="center"> <font size="6" color="#FF0000"><b>如</b></font><font lang="ZH-CN" color="#FF0000" size="6"><b>何成为优秀的车间主管</b></font></div></td> </tr> </table> </div></td> </tr> </table> <table width="673" border="0" align="center" cellpadding="0" cellspacing="0" class="td" height="1411"> <tr> <td height="1415" bgcolor="#FFFFFF"> <div align="center"> <table width="99%" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="17%" height="20" bgcolor="#BF0000" class="td"> <div align="center"><font color="#FFFFFF">[课 程 背 景]</font></div></td> <td width="83%" class="td"> </td> </tr> <tr> <td height="74" colspan="2" class="td"> <p ALIGN="JUSTIFY"><font LANG="ZH-CN"> </font><font lang="ZH-CN" size="2"> </font><font lang="ZH-CN" size="2"><span style="mso-bidi-font-size: 9.0pt; mso-bidi-font-family: Times New Roman; mso-font-kerning: 1.0pt; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA">对于很多的班组长来讲,从优秀的技术工人走向基层管理岗位,很多时候不得不面对:<br> 1、上级骂、下属怨,生产现场一天忙的脚朝天,现场管理依然乱糟糟....<br> 2、生产任务完不成找我,员工有情绪找我,效率、质量搞不好也找我...<br> 3、手下一管就是几十号人,做事我行,管人、带人,让这群人顺顺畅畅完成工作可就...<br> 4、你说一套,他做另外一套,他觉得他的方法还比你好,怎么个教法?<br> 5、生产线变化频繁,会这个,不会那个,人一堆,岗位却常常缺人手,怎么办?<br> 6、大错不犯,小错不断,员工老是违反纪律,怎么让员工改正?<br> 7、表现不好,说他几句,表面应承,后面跟你对着干,怎么让员工接受主管的意见?<br> 8、愣头青、老油条、刺儿头如何管,如何带?<br> 9、发生问题,主管总是最后一个知道信息,怎么跟员工沟通,让员工有效配合工作?<br> 10、我们基层主管既决定不了员工薪水,也决定不了公司环境,怎么激励手下这些人?<br> 11、生产现场我们也想搞好,可就是难以有效发现问题,在生产现场怎样培养问题意识?<br> 12、一天到晚都在处理问题,可是很多时候还是头痛医头,脚痛医脚,怎么办?<br> 一流的工厂都拥有一流的制造现场--持续提高效率、不断降低制造成本:一流的主管培养训练了一流的员工,一流员工创造了一流的现场!优秀的一线主管不仅有扎实的技术操作能力,而且有着丰富的解决问题、管理团队的"软"技能!调查显示我国大多制造企业的事实是:企业中许多承担管理职能的一线主管,大多只发挥了"技术能手"的作用,多数都是"球星出身",而没有发挥"一线教练"的作用,没能带出一个出色的团队! 如何从"技术操作型能手"转变为"一线教练型能手"--欢迎您参加本期生产管理技能培训!<br> 参加对象: 班组长、技术员</span></font></td> </tr> </table> </div> <div align="center" style="width: 671; height: 1"> </div> <div align="center"> <table width="99%" height="84" border="0" cellpadding="0" cellspacing="0"> <tr> <td width="17%" height="20" bgcolor="#0080C0" class="td"> <div align="center"><font color="#FFFFFF">[课 程 大 纲]</font></div></td> <td width="83%" class="td"> </td> </tr> <tr> <td height="64" colspan="2" class="td"> <p><font size="2"><font color="#0000FF">第一篇 班组长的角色认知及其素养</font><br> 一、班组长的角色认知<br> 班组长的地位和使命<br> 班组长的重要作用<br> 班组长的素质要求<br> 认识企业管理中的各种角色<br> 角色认知--对自己和环境的分析<br> 二、班组长应学习的团队管理和沟通技术<br> 如何实施有效的信息传递<br> 如何与上级、同级沟通<br> 现场团队建设与职场沟通<br> 如何领导不同个性的人<br> 沟通游戏:学会沟通技巧<br> 团队冲突的原因分析<br> 如何提升团队战斗力<br> 三、班组成本分析与目标管理<br> 如何分析分解各项管理指标<br> 如何制定目标<br> 如何组织实施并达成目标<br> <br> <font color="#0000FF">第二篇 班组长应备的管理技能</font><br> 一、如何进行工作汇报<br> 工作汇报的含义及其方式<br> 工作汇报的主要内容<br> 工作汇报的具体要求<br> 二、如何管理下属<br> 了解下属的期望值<br> 如何化解下属的矛盾<br> 如何对待非正式群体<br> 如何批评下属<br> 三、工作教导与员工绩效改善<br> 工作现场经常出现的问题<br> 何时需要工作教导<br> 员工绩效不良的原因分析<br> 如何教导下属改善绩效<br> 讨论:培训下属误区分析<br> 提高OJT培训效果的秘诀<br> 工作教导四阶段 <br> 使用"现场多技能管理表"<br> 演练:改变下属不良行为<br> <br> <font color="#0000FF">第三篇 如何组织实施品质和效率改善</font><br> 一、工作改善的思路与方法 <br> 现场工作改善的基础:5S与目视管理<br> 工作改善基本原则和着眼点<br> 工作改善的基本方法和工具<br> 现场防呆管理(Poka Yoke)<br> 现场安全管理与改善<br> 演练:应用头脑风暴法改善工作<br> 二、发掘问题与解决问题的能力<br> 发掘问题与解决问题是企业发展的内在动力<br> 面对问题的心态<br> 面对复杂的工作--如何突破困境<br> 问题分析与解决"正确之程序<br> 案例:丰田公司解决问题的思维模式<br> 三、现场品质管理<br> 生产过程中品质如何来控制<br> 出现品质异常时如何来处理<br> 品质信息的反馈、跟进、与处理<br> 如何开展QCC品管圈活动<br> 案例:GE是如何实践"品质至上"<br> 四、IE现场改善<br> 现场改善是成本降低的基础 <br> IE现场改善方法<br> 如何挖掘成本浪费所在 <br> 如何清除人员的浪费<br> 如何降低材料损耗直接之成本<br> 改善生产工艺、提升效率、达至降低成本<br> 案例:丰田汽车JIT精益生产实际案例</font> </p></td> </tr> </table> <table width="99%" height="84" border="0" cellpadding="0" cellspacing="0"> <tr> <td width="17%" height="20" bgcolor="#0080C0" class="td"> <div align="center"><font color="#FFFFFF">[导 师 简 介]</font></div></td> <td width="83%" class="td"> </td> </tr> <tr> <td height="64" colspan="2" class="td"> <p><span style="font-size:9.0pt; font-family:宋体;mso-ascii-font-family:"Times New Roman";mso-hansi-font-family: "Times New Roman";letter-spacing:0pt" class="9p1"> </span><span style="letter-spacing: 0pt" class="9p1"><font size="2"> </font><span style="letter-spacing: 0pt"><font color="#FF0000" size="3">Mr Wang</font><font size="2">,<font color="#FF0000">管理工程硕士、高级经济师,6SIGMA黑带,国际职业培训师协会认证职业培训师。</font>王先生长期推行工业工程、精益生产等先进运作方式,历任大型跨国公司生产负责人、工业工程经理、项目总监,王老师主要从事生产计划与物料控制、IE技术应用、成本控制、价值工程的讲授,先后为IBM、TDK、松下、可口可乐、康师傅、汇源果汁、雪津啤酒、吉百利食品、冠捷电子、INTEX明达塑胶、正新橡胶、美国ITT集团、广上科技、美的空调、中兴通讯、京信通信,联想电脑,应用材料(中国)公司、艾克森-金山石化、中国化工进出口公司、正大集团大福饲料、厦华集团、灿坤股份、NEC东金电子、太原钢铁集团、PHILIPS、深圳开发科技、大冷王运输制冷、三洋华强、TCL、EPSON、长安福特、泰科电子、长城计算机等知名企业提供项目辅导或专题培训。王老师授课经验丰富,风格幽默诙谐、逻辑清晰、过程互动,案例生动、深受学员喜爱</font></span></span><span lang="EN-US" style="font-size:9.0pt;letter-spacing:0pt" class="9p1"><font size="2">。</font></o:p> </span> </p></td> </tr> </table> </div> <div align="center"> <table width="667" border="0" cellpadding="0" cellspacing="0" height="60"> <tr> <td width="111" height="26" bgcolor="#0080C0" class="td"> <div align="center"><font color="#FFFFFF">[时间/地点/报名]</font></div></td> <td width="552" class="td" height="26"> </td> </tr> <tr> <td height="34" colspan="2" class="td" width="665"> <p><font size="2"><b><font color="#BF0000">时间</font><font color="#000000">: </font></b><font color="#000000"> 8</font>月26-27日(周六/日) <b><font color="#BF0000"> 地点</font><font color="#000000">:</font></b> 苏州 1800元/人 <font color="#BF0000"> </font>四人以上参加,赠予一名名额</font> </p> </td> </tr> </table> </div> <table width="99%" height="32" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td height="12" class="td"> <font size="2"><b><font color="#BF0000">报名/咨询</font><font color="#000000">:</font></b> 谢小姐 021-51187126 注: 如您需要订退,请将邮箱发送至: ee...@12...</font></td> </tr> </table> </td> </tr> </table> </body> </html> |
From: Stephen W. <drs...@gm...> - 2006-08-20 22:32:37
|
On 8/18/06, Joris De Ridder <jo...@st...> wrote: > > > > Sorry about my ignorance about these things. But is lapack_lite linked > to numpy even if you specify the full lapack library? As I understand it, lapack_lite is built and used by numpy as a shared library with a subset of the LAPACK routines. After some googling I learned that g2c is a lib which takes care that you > can link fortran and C libraries (again my ignorance...). Which platform are you on? If you do python setup.py build >& spool grep lapack spool what output do you get? |
From: Albert S. <fu...@gm...> - 2006-08-20 12:53:49
|
Hello all > <snip> > Furthermore: the TRAC tickets do not seem to allow attachment of > patches. Did I miss something there? After submitting the initial report, you can attach files to the ticket. Regards, Albert |
From: Norbert N. <Nor...@gm...> - 2006-08-20 10:52:03
|
Travis Oliphant wrote: > Norbert Nemec wrote: > >> Hi there, >> >> in numpy-1.0b2 the logic in setup.py is slightly off. The attached patch >> fixes the issue. >> >> Greetings, >> Norbert >> >> PS: I would have preferred to submit this patch via the sourceforge >> bug-tracker, but that seems rather confusing: there are tabs "Numarray >> Patches" and "Numarray Bugs" but no "NumPy bugs" and the tab "Patches" >> seems to be used for Numeric. Why isn't NumPy handled via the >> Sourceforge page? >> >> > NumPy development happens on the SVN servers at scipy.org and > bug-tracking is handled through the Trac system at > > http://projects.scipy.org/scipy/numpy > > We only use sourceforge for distribution. > OK, sorry. I found this myself in the meantime. I even remember that I stumbled over this some time ago already. Problem is: I'm submitting bug-reports, fixes and small patches to so many different projects, that I start mixing up the details of the individual procedures. Furthermore: the TRAC tickets do not seem to allow attachment of patches. Did I miss something there? > I need more description on why the logic is not right. > The original code reads: ----------------------- [...snip...] if nosmp: moredefs = [('NPY_ALLOW_THREADS', '0')] else: moredefs = [] [...snip...] if moredefs: target_f = open(target,'a') for d in moredefs: if isinstance(d,str): target_f.write('#define %s\n' % (d)) else: target_f.write('#define %s %s\n' % (d[0],d[1])) if not nosmp: # default is to use WITH_THREAD target_f.write('#ifdef WITH_THREAD\n#define NPY_ALLOW_THREADS 1\n#else\n#define NPY_ALLOW_THREADS 0\n#endif\n') target_f.close() [...snip...] ---------------- That is: if not nosmp, then moredefs may be empty, in which case NPY_ALLOW_THREADS is not defined at all. My patch ensures that NPY_ALLOW_THREADS is defined in any case, either by putting it in moredefs, or by adding the special conditional define. The conditional "if moredefs" is not needed at all: the file needs to be opened in any case, to define NPY_ALLOW_THREADS one way or other. Greetings, Norbert |
From: Simon B. <si...@ar...> - 2006-08-20 09:37:26
|
On Wed, 12 Jul 2006 16:42:55 -0600 Travis Oliphant <oli...@ie...> wrote: > > Attached is a patch that makes PIL Image objects both export and consume > the array interface. Cool ! I found that upon converting to/from a numpy array the image is upside-down. Simon. -- Simon Burton, B.Sc. Licensed PO Box 8066 ANU Canberra 2601 Australia Ph. 61 02 6249 6940 http://arrowtheory.com |
From: Tommy G. <tg...@ma...> - 2006-08-20 00:54:47
|
I am trying to install numpy on my Apple Powerbook G4 running OS X Tiger (10.4.7). I am running ActivePython 2.4.3. Installing the numPy package seems to work fine but when I try to import it I get the following: /Users/tgrav --> python ActivePython 2.4.3 Build 11 (ActiveState Software Inc.) based on Python 2.4.3 (#1, Apr 3 2006, 18:07:18) [GCC 3.3 20030304 (Apple Computer, Inc. build 1666)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import numpy Traceback (most recent call last): File "<stdin>", line 1, in ? File "/Library/Frameworks/Python.framework/Versions/2.4/lib/ python2.4/site-packages/numpy/__init__.py", line 35, in ? import core File "/Library/Frameworks/Python.framework/Versions/2.4/lib/ python2.4/site-packages/numpy/core/__init__.py", line 10, in ? from numeric import * File "/Library/Frameworks/Python.framework/Versions/2.4/lib/ python2.4/site-packages/numpy/core/numeric.py", line 33, in ? CLIP = multiarray.CLIP AttributeError: 'module' object has no attribute 'CLIP' >>> How can I remedy this problem? Cheers Tommy tg...@ma... http://homepage.mac.com/tgrav/ "Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genious -- and a lot of courage -- to move in the opposite direction" -- Albert Einstein |
From: Daniel F. <djo...@ya...> - 2006-08-20 00:43:52
|
Any advice on installing numpy in Python 2.5 on WindowsXP? |
From: Charles R H. <cha...@gm...> - 2006-08-20 00:00:25
|
Yes, On 8/19/06, Joris De Ridder <jo...@st...> wrote: > Hi, > > Some of my code is heavily using large complex arrays, and I noticed a speed > degression in NumPy 1.0b2 with respect to Numarray. The following code snippet > is an example that on my computer runs 10% faster in Numarray than in NumPy. > > >>> A = zeros(1000000, complex) > >>> for k in range(1000): > ... A *= zeros(1000000, complex) > > (I replaced 'complex' with 'Complex' in Numarray). Can anyone confirm this? I see this too. In [242]: t1 = timeit.Timer('a *= nx.zeros(1000000,"D")','import numarray as nx; a = nx.zeros(1000000,"D")') In [243]: t2 = timeit.Timer('a *= nx.zeros(1000000,"D")','import numpy as nx; a = nx.zeros(1000000,"D")') In [244]: t1.repeat(3,100) Out[244]: [5.184194803237915, 5.1135070323944092, 5.1053409576416016] In [245]: t2.repeat(3,100) Out[245]: [5.5170519351959229, 5.4989008903503418, 5.479154109954834] Chuck |
From: Joris De R. <jo...@st...> - 2006-08-19 22:55:56
|
Hi, Some of my code is heavily using large complex arrays, and I noticed a speed degression in NumPy 1.0b2 with respect to Numarray. The following code snippet is an example that on my computer runs 10% faster in Numarray than in NumPy. >>> A = zeros(1000000, complex) >>> for k in range(1000): ... A *= zeros(1000000, complex) (I replaced 'complex' with 'Complex' in Numarray). Can anyone confirm this? Ciao, Joris |
From: Charles R H. <cha...@gm...> - 2006-08-19 01:35:46
|
Hi All, I've noticed a lot of trailing whitespace while browsing through the numpy subversion repository. So here is a perl script I pinched from the linux-kernel mailing list that does a good job of removing it. Chuck |
From: Joris De R. <jo...@st...> - 2006-08-19 00:17:11
|
Hi, [PL]: s_wsfe is not LAPACK's routine it's a routine from the g2c library. [PL]: You have to link it in in addition to lapack_lite. Thanks for the pointer. Sorry about my ignorance about these things. But is lapack_lite linked to numpy even if you specify the full lapack library? After some googling I learned that g2c is a lib which takes care that you can link fortran and C libraries (again my ignorance...). It's still not obvious for me, though, where/how I can make the install program do this linking. I have a /usr/lib/libg2c.a, so I am surprised it doesn't find it right away... Anybody experienced something similar, or other pointers? Ciao, Joris |
From: Sebastian H. <ha...@ms...> - 2006-08-19 00:05:24
|
On Friday 18 August 2006 16:51, Travis Oliphant wrote: > Sebastian Haase wrote: > > On Friday 18 August 2006 15:25, Travis Oliphant wrote: > >> Sebastian Haase wrote: > >>> On Friday 18 August 2006 11:38, Travis Oliphant wrote: > >>>> Sebastian Haase wrote: > >>>>> Hi, > >>>>> array dtype descriptors have an attribute itemsize that gives the > >>>>> total number of bytes required for an item of that dtype. > >>>>> > >>>>> Scalar types, like numy.int32, also have that attribute, > >>>>> but it returns "something else" - don't know what: > >>>>> > >>>>> > >>>>> Furthermore there are *lot's* of more attributes to a scalar dtype, > >>>>> e.g. > >>>> > >>>> The scalar types are actual Python types (classes) whereas the dtype > >>>> objects are instances. > >>>> > >>>> The attributes you are seeing of the typeobject are very useful when > >>>> you have an instance of that type. > >>>> > >>>> With numpy.int32.itemsize you are doing the equivalent of > >>>> numpy.dtype.itemsize > >>> > >>> but why then do I not get the result 4 ? > >> > >> Because it's not a "class" attribute, it's an instance attribute. > >> > >> What does numpy.dtype.itemsize give you? > > > > I'm really sorry for being so dumb - but HOW can I get then the number of > > bytes needed by a given scalar type ? > > Ah, the real question. Sorry for not catching it earlier. I've been in > "make sure this isn't a bug mode" for a long time. > > If you have a scalar type you could create one and then check the itemsize: > > int32(0).itemsize > > Or you could look at the name and parse out how big it is. > > There is also a stored dictionary-like object that returns the number of > bytes for any data-type recognized: > > numpy.nbytes[int32] Thanks, that seems to be a handy "dictionary-like object" Just for the record - in the meantime I found this: >>> N.dtype(N.int32).itemsize 4 Cheers, Sebastian |
From: Stefan v. d. W. <st...@su...> - 2006-08-19 00:01:13
|
On Fri, Aug 18, 2006 at 04:45:03PM +0200, Stefan van der Walt wrote: > Hi Norbert >=20 > On Fri, Aug 18, 2006 at 03:36:47PM +0200, Norbert Nemec wrote: > > in numpy-1.0b2 the logic in setup.py is slightly off. The attached pa= tch > > fixes the issue. >=20 > Please file a ticket so that we don't lose track of this. Urgh, please excuse me. It seems that I have lost the ability to read more than one paragraph. St=E9fan |