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: <hj...@to...> - 2006-08-26 15:39:55
|
<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="684" border="0" align="center" cellpadding="0" cellspacing="0" height="1171"> <tr> <td height="71" bgcolor="#8C8C8C"> <div align="center"> <table width="100%" border="0" cellspacing="1" cellpadding="0" height="76"> <tr> <td height="74" bgcolor="#F3F3F3"><div align="center"> <span lang="zh-cn"><font size="6">运用EXCEL和PPT改进管理和经营决策</font></span></div></td> </tr> </table> </div></td> </tr> <tr> <td height="1095" bgcolor="#FFFFFF"> <div align="center"> <table width="99%" border="0" cellspacing="0" cellpadding="0" height="48"> <tr> <td width="17%" height="22" bgcolor="#BF0000" class="td"> <div align="center"><font color="#FFFFFF">[课 程 背 景]</font></div></td> <td width="83%" class="td" height="22"> </td> </tr> <tr> <td height="26" colspan="2" class="td"> <p ALIGN="JUSTIFY"><font LANG="ZH-CN"> <font size="2"> 不管您在什么岗位上工作,利用Excel电子表格进行数据分析几乎已经成为每个经理人的必备工具,无论您从事采购、销售、财务分析还是经营决策,电子表格能够帮助你筛选数据、分析数据并制作管理图表,Excel的各种财务函数为您进行本量利分析和经营决策提供了方便。如果你打算利用Excel提高工作质量和效率,运用Powerpoint制作优美的演示报告取得不同凡响的震撼效果,那么这个课程就是为你定制的。<br> <b>培 训 收 益:</b><br> 提高EXCEL和PPT实际操作能力,提高工作效率;<br> 掌握如何利用各种函数建立数学模型进行高效财务分析;<br> 掌握快速实现产品、客户分类的方法,使公司效益倍增;<br> 掌握建立多因素量本利敏感分析模型,使你直观地发现最佳盈利模式;<br> 掌握利用各种预测工具,寻找营销方案;<br> 掌握如何制作令老板满意的各类图表和管理报告。 </font> </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"><b>一、EXCEL和Powerpoint的操作技巧</b><br> 1 数据管理:<br> 数据格式、建立公式、数据编辑、图表制作、排序、筛选、分类汇总<br> 2 数据分析:<br> 数据透视表(图)、数据敏感分析、单变量求解、模拟运算表、规划求解<br> 3 不同类型报告的模版演示:<br> ①业绩报告;项目汇报、②财务报告、③动员与展望、④评审/评估报告<br> 4 图表应用的五个步骤:<br> 目标、主题、对比关系、数据、图表<br> 5 用PPT表达思想<br> 管理结构、工作流程、业绩趋势和分析、竞争对手的对比<br> 6 PPT与EXCEL,OUTLOOK的链接使用技巧<br> <br> <b>二、如何运用图表进行事务处理和工作报告</b><br> 怎样快速创建出你需要的图表<br> 如何创建动态图<br> 如何因地制宜地使用图表<br> 行政管理表格设计<br> 人力资源管理表格设计<br> 如何自动生成员工考核工资表<br> 企业销售业绩的图表表达<br> 产品市场占有率的图表表达<br> 如何运用EXCEL分析市场调查问卷<br> 如何运用EXCEL制作和分析销售报表<br> 如何运用EXCEL制作和分析财务报表<br> 人事、物料、财务数据库的链接和自动处理<br> <br> <b>三、如何运用EXCEL进行本量利分析和经营决策</b><br> 成本费用分析与管理<br> 销售业务管理与决策<br> 动态本量利模型分析<br> 固定资产折旧计算<br> 工资及个人所得税计算<br> 现金日报及现金流量表的编制<br> 由资产负债表自动生成现金流量表<br> 工资、固定资产投资、折旧方案筛选等实际运用模板建立和应用分析<br> 量本利分析、回归分析、方案预测、销售客户产品分析等实战演练<br> 定性指标的定量化分析技术应用的模拟演练<br> 运用数据透视表(图)进行经营分析的分析思路和模拟演练<br> 投资项目评价与决策<br> <br> <b>四、管理和经营报告</b><br> 用图片插入技术制作项目分析短片<br> 动画展示产品型号及功能<br> 市场分析及推广计划演示<br> 形象化的股东大会营运报告<br> 制作动感宣传片<br> 丰富多彩的可行性研究报告<br> <br> <b>五、案例分析和实例演练</b></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> <font color="#FF0000"> </font><font size="2">Mr Wang ,管理工程硕士、高级经济师,国际职业培训师协会认证职业培训师,历任跨国公司工业工程经理、管理会计分析师、营运总监等高级管理职务多年,同时还担任 < 价值工程 > 杂志审稿人、辽宁省营口市商业银行独立董事等职务,对企业管理有较深入的研究。 王老师主要从事成本控制、财务管理、管理会计决策等课程的讲授,为 IBM 、 TDK 、松下、可口可乐、康师傅、汇源果汁、雪津啤酒、吉百利食品、冠捷电子、 INTEX 明达塑胶、正新橡胶、美国 ITT 集团、广上科技、美的空调、中兴通讯、京信通信、联想电脑,应用材料 ( 中国 ) 公司、艾克森 - 金山石化、中国化工进出口公司、正大集团大福饲料、厦华集团、灿坤股份、NEC 东金电子、太原钢铁集团、 PHILIPS 、深圳开发科技、大冷王运输制冷、三洋华强、 TCL 、美的汽车、上海贝尔阿尔卡特、天津扎努西、上海卡博特等知名企业提供项目辅导或专题培训。王老师授课经验丰富,风格幽默诙谐、逻辑清晰、过程互动,案例生动、深受学员喜爱。</font></p></td> </tr> </table> </div> <div align="center"> <table width="679" border="0" cellpadding="0" cellspacing="0" height="70"> <tr> <td width="132" height="24" bgcolor="#0080C0" class="td"> <div align="center"><font color="#FFFFFF">[时间/地点/联系方式]</font></div></td> <td width="546" class="td" height="24"> </td> </tr> <tr> <td height="46" colspan="2" class="td" width="679"> <p><font size="2"><b>时间:</b> 9月9-10日 (周六/日) 上海 1980/人<font face="宋体">(含课程费、教材、午餐等)</font> 四人以上参加,赠予一名名额</font></p> </td> </tr> </table> </div> <table width="99%" height="45" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td height="25" class="td"> <font size="2"><b>报名/咨询:</b><font color="#000000"> </font>谢小姐 <font color="#000000">021-51187126</font><br> 注:如您不需要此邮件,请发送邮件至:ee...@12... 并在标题注明订退</font></td> </tr> </table> </td> </tr> </table> </body> </html> |
From: Albert S. <fu...@gm...> - 2006-08-26 15:20:15
|
A complete code snippet that reproduces the bug would be most helpful. If there is a memory corruption problem, it might show up if we run the problematic code under Valgrind. Regards, Albert > -----Original Message----- > From: num...@li... [mailto:numpy- > dis...@li...] On Behalf Of Sven Schreiber > Sent: 26 August 2006 14:14 > To: numpy-discussion > Subject: [Numpy-discussion] memory corruption bug > > Hi, > I experienced this strange bug which caused a totally unrelated variable > to be overwritten (no exception or error was raised, so it took me while > to rule out any errors of my own). |
From: Sven S. <sve...@gm...> - 2006-08-26 15:12:52
|
I appreciate your warnings, thanks. However, they don't seem to apply here, or why would my described workaround work at all in that case? Also, afaict, the affected variable is not even passed to the class where the problematic assignment happens. -sven Bill Baxter schrieb: > You're sure it's not just pass-by-reference semantics biting you? > If you make an array and pass it to another class or function, by > default they just get a reference to the same array. > so e.g.: > > a = numpy.array ([1,2,3]) > some_class.set_array(a) > a[1] = 10 > > Then both the local 'a' and the 'a' that some_class has are now [1,10,3]. > If you don't want that sharing then you need to make an explicit copy of > a by calling a.copy (). > Watch out for lists or dicts of arrays too. The python idom for > copying a list: new_list = list_orig[:], won't copy the contents of > elements that are array. If you want to be sure to make complete copies > of complex data structures, there's the deepcopy method of the copy > module. new_list = copy.deepcopy(list_orig). > > I found a bunch of these sorts of bugs in some code I ported over from > Matlab last week. Matlab uses copy semantics for everything, so if you > pass a matrix A to a function in Matlab you can always treat it as a > fresh local copy inside the function. Not so with Python. I found that > locating and fixing those bugs was the most difficult thing about > porting Matlab code to Numpy (that and the lack of some major toolkit or > function you use in Matlab doesn't have an equivalent in Numpy... like > eigs()). > > --bb > > > > On 8/26/06, *Sven Schreiber* <sve...@gm... > <mailto:sve...@gm...>> wrote: > > Hi, > I experienced this strange bug which caused a totally unrelated variable > to be overwritten (no exception or error was raised, so it took me while > to rule out any errors of my own). > > The context where this is in is a method of a class ( Vecm.getSW()), and > the instance of Vecm is created within a different class (GG.__init__). > Now, the affected variable is in the namespace of GG (it's GG.urate), > and so I would think that anything local in Vecm.getSW () should not > affect GG.urate, right? > > Originally I did: > > glx[lag:, :] -= temp > > But that caused the described problem. Then I tried: > > glx[lag:, :] = glx[lag:, :] - temp > > But the same problem remains. Then I worked around the slice assignment > like this: > > temp4 = r_[zeros([lag, n_y]), temp] > glx = glx - temp4 > > And everything is ok! However, when I alter the second line of this > workaround to: > > glx -= temp4 > > The problem reappears! So I'm not even sure whether this is one or two > bugs... > > This is with yesterday's numpy svn on windows, but the same thing > happens with an earlier svn (~b2) as well. If you need further info, > please tell me how to provide it. > > Thanks, > Sven > |
From: Keith G. <kwg...@gm...> - 2006-08-26 14:05:20
|
On 8/26/06, Bill Baxter <wb...@gm...> wrote: > On 8/26/06, Travis Oliphant <oli...@ie...> wrote: > > > > > I've come up with adding the functions (not methods at this point) > > > > deletefrom > > insertinto > > > "delete" and "insert" really would be better. The current "insert" > function seems inaptly named. What it does sounds more like "overlay" or > "set_masked". I prefer delete and insert too. I guess it is OK that del and delete are similar (?) |
From: Bill B. <wb...@gm...> - 2006-08-26 12:52:04
|
You're sure it's not just pass-by-reference semantics biting you? If you make an array and pass it to another class or function, by default they just get a reference to the same array. so e.g.: a = numpy.array([1,2,3]) some_class.set_array(a) a[1] = 10 Then both the local 'a' and the 'a' that some_class has are now [1,10,3]. If you don't want that sharing then you need to make an explicit copy of a by calling a.copy(). Watch out for lists or dicts of arrays too. The python idom for copying a list: new_list = list_orig[:], won't copy the contents of elements that are array. If you want to be sure to make complete copies of complex data structures, there's the deepcopy method of the copy module. new_list = copy.deepcopy(list_orig). I found a bunch of these sorts of bugs in some code I ported over from Matlab last week. Matlab uses copy semantics for everything, so if you pass a matrix A to a function in Matlab you can always treat it as a fresh local copy inside the function. Not so with Python. I found that locating and fixing those bugs was the most difficult thing about porting Matlab code to Numpy (that and the lack of some major toolkit or function you use in Matlab doesn't have an equivalent in Numpy... like eigs()). --bb On 8/26/06, Sven Schreiber <sve...@gm...> wrote: > > Hi, > I experienced this strange bug which caused a totally unrelated variable > to be overwritten (no exception or error was raised, so it took me while > to rule out any errors of my own). > > The context where this is in is a method of a class (Vecm.getSW()), and > the instance of Vecm is created within a different class (GG.__init__). > Now, the affected variable is in the namespace of GG (it's GG.urate), > and so I would think that anything local in Vecm.getSW() should not > affect GG.urate, right? > > Originally I did: > > glx[lag:, :] -= temp > > But that caused the described problem. Then I tried: > > glx[lag:, :] = glx[lag:, :] - temp > > But the same problem remains. Then I worked around the slice assignment > like this: > > temp4 = r_[zeros([lag, n_y]), temp] > glx = glx - temp4 > > And everything is ok! However, when I alter the second line of this > workaround to: > > glx -= temp4 > > The problem reappears! So I'm not even sure whether this is one or two > bugs... > > This is with yesterday's numpy svn on windows, but the same thing > happens with an earlier svn (~b2) as well. If you need further info, > please tell me how to provide it. > > Thanks, > Sven > > > > > ------------------------------------------------------------------------- > 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: Nadav H. <na...@vi...> - 2006-08-26 12:45:47
|
I once wrote a function "tensormultiply" which is a part of numarray = (undocumented). You can borrow it from there. Nadav -----Original Message----- From: num...@li... on behalf of Simon = Burton Sent: Fri 25-Aug-06 14:42 To: num...@li... Cc:=09 Subject: [Numpy-discussion] tensor dot ? >>> numpy.dot.__doc__ matrixproduct(a,b) Returns the dot product of a and b for arrays of floating point types. Like the generic numpy equivalent the product sum is over the last dimension of a and the second-to-last dimension of b. NB: The first argument is not conjugated. Does numpy support summing over arbitrary dimensions, as in tensor calculus ? I could cook up something that uses transpose and dot, but it's reasonably tricky i think :) Simon. --=20 Simon Burton, B.Sc. Licensed PO Box 8066 ANU Canberra 2601 Australia Ph. 61 02 6249 6940 http://arrowtheory.com=20 -------------------------------------------------------------------------= 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=3Dlnk&kid=3D120709&bid=3D263057&dat=3D= 121642 _______________________________________________ Numpy-discussion mailing list Num...@li... https://lists.sourceforge.net/lists/listinfo/numpy-discussion |
From: Sven S. <sve...@gm...> - 2006-08-26 12:20:23
|
Hi, is this normal behavior?: >>> import numpy as n; print n.mat(0.075).round(2); print n.mat(0.575).round(2) [[ 0.08]] [[ 0.57]] Again, yesterday's svn on windows. cheers, Sven |
From: Sven S. <sve...@gm...> - 2006-08-26 12:13:46
|
Hi, I experienced this strange bug which caused a totally unrelated variable to be overwritten (no exception or error was raised, so it took me while to rule out any errors of my own). The context where this is in is a method of a class (Vecm.getSW()), and the instance of Vecm is created within a different class (GG.__init__). Now, the affected variable is in the namespace of GG (it's GG.urate), and so I would think that anything local in Vecm.getSW() should not affect GG.urate, right? Originally I did: glx[lag:, :] -= temp But that caused the described problem. Then I tried: glx[lag:, :] = glx[lag:, :] - temp But the same problem remains. Then I worked around the slice assignment like this: temp4 = r_[zeros([lag, n_y]), temp] glx = glx - temp4 And everything is ok! However, when I alter the second line of this workaround to: glx -= temp4 The problem reappears! So I'm not even sure whether this is one or two bugs... This is with yesterday's numpy svn on windows, but the same thing happens with an earlier svn (~b2) as well. If you need further info, please tell me how to provide it. Thanks, Sven |
From: Bill B. <wb...@gm...> - 2006-08-26 12:13:17
|
On 8/26/06, Travis Oliphant <oli...@ie...> wrote: > > > I've come up with adding the functions (not methods at this point) > > deletefrom > insertinto "delete" and "insert" really would be better. The current "insert" function seems inaptly named. What it does sounds more like "overlay" or "set_masked". ... or the existing "putmask" which I see does a similar thing. Actually there seems to be a little doc-bug there or something. numpy.insert claims it differs from putmask in that it only accepts a vector of values with same number of vals as the # of non-zero entries in the mask, but a quick test revals it's quite happy with a different number and cycles through them. In [31]: a = numpy.zeros((3,3)) In [32]: numpy.insert(a, [[0,1,0],[1,0,0],[1,0,0]], [4,5]) In [33]: a Out[33]: array([[ 0., 4., 0.], [ 5., 0., 0.], [ 4., 0., 0.]]) Anyway, in the end nothing has really been inserted, existing entries have just been replaced. So "insert" seems like a much better name for a function that actually puts in a new row or column. --bb |
From: Bill B. <wb...@gm...> - 2006-08-26 11:42:36
|
On 8/26/06, Francesc Altet <fa...@ca...> wrote: > > I'm personally an addict to encapsulate as much functionality as possible > in > methods (but perhaps I'm biased by an insane use of TAB in ipython > console). You can still get tab completion for functions: numpy.<TAB> Even if it's your custom to "from numpy import *" you can still also do an "import numpy" or "import numpy as N". --bb |
From: Travis O. <oli...@ie...> - 2006-08-26 10:26:35
|
Martin Spacek wrote: > Hello, > > I'm a bit ignorant of optimization in numpy. > > I have a movie with 65535 32x32 frames stored in a 3D array of uint8 > with shape (65535, 32, 32). I load it from an open file f like this: > > >>> import numpy as np > >>> data = np.fromfile(f, np.uint8, count=65535*32*32) > >>> data = data.reshape(65535, 32, 32) > > I'm picking several thousand frames more or less randomly from > throughout the movie and finding the mean frame over those frames: > > >>> meanframe = data[frameis].mean(axis=0) > > frameis is a 1D array of frame indices with no repeated values in it. If > it has say 4000 indices in it, then the above line takes about 0.5 sec > to complete on my system. I'm doing this for a large number of different > frameis, some of which can have many more indices in them. All this > takes many minutes to complete, so I'm looking for ways to speed it up. > > If I divide it into 2 steps: > > >>> temp = data[frameis] > >>> meanframe = temp.mean(axis=0) > > and time it, I find the first step takes about 0.2 sec, and the second > takes about 0.3 sec. So it's not just the mean() step, but also the > indexing step that's taking some time. > If frameis is 1-D, then you should be able to use temp = data.take(frameis,axis=0) for the first step. This can be quite a bit faster (and is a big reason why take is still around). There are several reasons for this (one of which is that index checking is done over the entire list when using indexing). -Travis |
From: Martin S. <nu...@ms...> - 2006-08-26 10:06:57
|
Hello, I'm a bit ignorant of optimization in numpy. I have a movie with 65535 32x32 frames stored in a 3D array of uint8 with shape (65535, 32, 32). I load it from an open file f like this: >>> import numpy as np >>> data = np.fromfile(f, np.uint8, count=65535*32*32) >>> data = data.reshape(65535, 32, 32) I'm picking several thousand frames more or less randomly from throughout the movie and finding the mean frame over those frames: >>> meanframe = data[frameis].mean(axis=0) frameis is a 1D array of frame indices with no repeated values in it. If it has say 4000 indices in it, then the above line takes about 0.5 sec to complete on my system. I'm doing this for a large number of different frameis, some of which can have many more indices in them. All this takes many minutes to complete, so I'm looking for ways to speed it up. If I divide it into 2 steps: >>> temp = data[frameis] >>> meanframe = temp.mean(axis=0) and time it, I find the first step takes about 0.2 sec, and the second takes about 0.3 sec. So it's not just the mean() step, but also the indexing step that's taking some time. If I flatten with ravel: >>> temp = data[frameis].ravel() >>> meanframe = temp.mean(axis=0) then the first step still takes about 0.2 sec, but the mean() step drops to about 0.1 sec. But of course, this is taking a flat average across all pixels in the movie, which isn't what I want to do. I have a feeling that the culprit is the non contiguity of the movie frames being averaged, but I don't know how to proceed. Any ideas? Could reshaping the data somehow speed things up? Would weave.blitz or weave.inline or pyrex help? I'm running numpy 0.9.8 Thanks, Martin |
From: Travis E. O. <oli...@ie...> - 2006-08-26 09:44:51
|
The 4th beta release of NumPy 1.0 has just been made available. NumPy 1.0 represents the culmination of over 18 months of work to unify the Numeric and Numarray array packages into a single best-of-breed array package for Python. NumPy supports all the features of Numeric and Numarray with a healthy dose of it's own improved features. It's time to start porting your applications to use NumPy as Numeric is no longer maintained and Numarray will only be maintained for a few more months. Porting is not difficult especially using the compatibility layers numpy.oldnumeric and numpy.numarray and the alter_code1.py modules in those packages. The full C-API of Numeric is supported as is the C-API of Numarray. More information is available at http://numpy.scipy.org NumPy Developers |
From: Travis O. <oli...@ie...> - 2006-08-26 08:34:41
|
Francesc Altet wrote: > Hi, > > I've lately ran into problems in numarray-->numpy conversions which are due to > a lack of suport of the array procol version 3 on behalf of numarray. For > more info on this issue see: > > http://projects.scipy.org/scipy/numpy/ticket/256 > > and > > http://projects.scipy.org/scipy/numpy/ticket/266 > > Question: is the numarray crew going to add this support anytime soon? If not, > I'd advocate to retain support for version 2 in NumPy at least for sometime > (until numarray gets the support), although I don't know whether this will > complicate things a lot in NumPy. > > I personally don't need this functionality as I've found a workaround for > PyTables (i.e. using the numpy.ndarray factory in order to create the NumPy > object directly from the numarray buffer), but I think this would be very > useful in helping other users (end-users mainly) in the numarray-->NumPy > transition. > Remember it's only the Python-side of version 2 of the protocol that is not supported. The C-side is still supported. Thus, it's only objects which don't export the C-side of the interface that are affected. In numarray that is the chararray and the recarray. Normal numarray arrays should work fine as the C-side of version 2 is still supported. I think the number of objects supporting the Python side of version 2 of the protocol is small enough that it is not worth the extra hassle (and attribute lookup time) in NumPy to support it. It would be a good thing if numarray supported version 3 of the protocol by adding the __array_interface__ attribute to support the Python side of version 3. -Travis |
From: Francesc A. <fa...@ca...> - 2006-08-26 08:06:22
|
Hi, I've lately ran into problems in numarray-->numpy conversions which are due= to=20 a lack of suport of the array procol version 3 on behalf of numarray. For=20 more info on this issue see: http://projects.scipy.org/scipy/numpy/ticket/256 and http://projects.scipy.org/scipy/numpy/ticket/266 Question: is the numarray crew going to add this support anytime soon? If n= ot,=20 I'd advocate to retain support for version 2 in NumPy at least for sometime= =20 (until numarray gets the support), although I don't know whether this will= =20 complicate things a lot in NumPy. I personally don't need this functionality as I've found a workaround for=20 PyTables (i.e. using the numpy.ndarray factory in order to create the NumPy= =20 object directly from the numarray buffer), but I think this would be very=20 useful in helping other users (end-users mainly) in the numarray-->NumPy=20 transition. Thanks, =2D-=20 >0,0< Francesc Altet =A0 =A0 http://www.carabos.com/ V V C=E1rabos Coop. V. =A0=A0Enjoy Data "-" |
From: Francesc A. <fa...@ca...> - 2006-08-26 07:20:51
|
Hi, A Dissabte 26 Agost 2006 01:55, Robert Kern va escriure: > Travis Oliphant wrote: > > I've come up with adding the functions (not methods at this point) > > > > deletefrom > > insertinto > > > > appendto (syntatic sugar for concatenate but with a separate argument > > for the array and the extra stuff) --- is this needed? > > > > These functions will operate along a particular axis (default is axis= =3D0 > > to match concatenate). > > > > Comments? > > I would drop appendto(). I also recommend leaving them as functions and n= ot > making methods from them. This will help prevent people from thinking that > these modify the arrays in-place. But there are already quite a few methods in NumPy that doesn't modify the= =20 array in-place (swapaxes, flatten, ravel or squeeze, but I guess many more). I'm personally an addict to encapsulate as much functionality as possible i= n=20 methods (but perhaps I'm biased by an insane use of TAB in ipython console). Cheers, =2D-=20 >0,0< Francesc Altet =A0 =A0 http://www.carabos.com/ V V C=E1rabos Coop. V. =A0=A0Enjoy Data "-" |
From: Torgil S. <tor...@gm...> - 2006-08-26 00:22:42
|
Not really recommended. But it might "work" with just running the script twice. I'm doing that with beta1 and the matplotlib that was current at the time of that release. Laziness i guess. //Torgil On 8/25/06, Travis Oliphant <oli...@ie...> wrote: > kor...@id... wrote: > > Message: 4 > > Date: Thu, 24 Aug 2006 14:17:44 -0600 > > From: Travis Oliphant <oli...@ee...> > > Subject: Re: [Numpy-discussion] (no subject) > > To: Discussion of Numerical Python > > <num...@li...> > > Message-ID: <44E...@ee...> > > Content-Type: text/plain; charset=ISO-8859-1; format=flowed > > > > kor...@id... wrote: > > > > > > > > You have a module built against an older version of NumPy. What modules > > are being loaded? Perhaps it is matplotlib or SciPy > > > > You need to re-build matplotlib. They should be producing a binary that > is compatible with 1.0b2 (I'm being careful to make sure future releases > are binary compatible with 1.0b2). > > Also, make sure that you remove the build directory under numpy if you > have previously built a version of numpy prior to 1.0b2. > > -Travis > > > ------------------------------------------------------------------------- > 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: Travis O. <oli...@ie...> - 2006-08-26 00:05:00
|
Keith Goodman wrote: > On 8/25/06, Travis Oliphant <oli...@ie...> wrote: > > >> I've come up with adding the functions (not methods at this point) >> >> deletefrom >> insertinto >> >> appendto (syntatic sugar for concatenate but with a separate argument >> for the array and the extra stuff) --- is this needed? >> >> These functions will operate along a particular axis (default is axis=0 >> to match concatenate). >> > > It is probably obvious to everyone except me: what is the syntax? > No, I'm sure it isn't obvious to anyone. Here's what I'm implementing (I'm using the default axis=None now which I like because it's consistent with everything else and it forces you to pick an axis for >1d arrays --- this also gives some purpose for the appendonto function) deletefrom(arr, obj, axis=None) where obj is either an integer, a slice object, or a sequence of integers indicating the rows to delete: > If x is 5x5 and I want to delete rows 2 and 4 is it deletfrom(x, [1,3], axis=0)? > Yes, if you are counting from 1. -Travis |
From: Robert K. <rob...@gm...> - 2006-08-25 23:56:10
|
Travis Oliphant wrote: > I've come up with adding the functions (not methods at this point) > > deletefrom > insertinto > > appendto (syntatic sugar for concatenate but with a separate argument > for the array and the extra stuff) --- is this needed? > > These functions will operate along a particular axis (default is axis=0 > to match concatenate). > > Comments? I would drop appendto(). I also recommend leaving them as functions and not making methods from them. This will help prevent people from thinking that these modify the arrays in-place. -- 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: Keith G. <kwg...@gm...> - 2006-08-25 23:47:04
|
On 8/25/06, Travis Oliphant <oli...@ie...> wrote: > I've come up with adding the functions (not methods at this point) > > deletefrom > insertinto > > appendto (syntatic sugar for concatenate but with a separate argument > for the array and the extra stuff) --- is this needed? > > These functions will operate along a particular axis (default is axis=0 > to match concatenate). It is probably obvious to everyone except me: what is the syntax? If x is 5x5 and I want to delete rows 2 and 4 is it deletfrom(x, [1,3], axis=0)? |
From: Sebastian H. <ha...@ms...> - 2006-08-25 23:24:52
|
On Friday 25 August 2006 16:16, Travis Oliphant wrote: > Sebastian Haase wrote: > > On Friday 25 August 2006 08:01, Travis Oliphant wrote: > >> Travis Oliphant wrote: > >>>> Now of course: I often needed to "insert" a column, row or section, > >>>> ... ? I made a quick and dirty implementation for that myself: > >>>> def insert(arr, i, entry, axis=0): > >>>> """returns new array with new element inserted at index i along > >>>> axis if arr.ndim>1 and if entry is scalar it gets filled in (ref. > >>>> broadcasting) > >>>> > >>>> note: (original) arr does not get affected > >>>> """ > >>>> if i > arr.shape[axis]: > >>>> raise IndexError, "index i larger than arr size" > >>>> shape = list(arr.shape) > >>>> shape[axis] += 1 > >>>> a= N.empty(dtype=arr.dtype, shape=shape) > >>>> aa=N.transpose(a, [axis]+range(axis)+range(axis+1,a.ndim)) > >>>> aarr=N.transpose(arr, [axis]+range(axis)+range(axis+1,arr.ndim)) > >>>> aa[:i] = aarr[:i] > >>>> aa[i+1:] = aarr[i:] > >>>> aa[i] = entry > >>>> return a > >>> > >>> Sure, it makes sense to parallel the delete function. > >> > >> Although there is already and insert function present in numpy.... > >> > >> -Travis > > > > Yeah - I saw that ... > > maybe one could introduce consistent namings like > > arr.copy_insert() > > arr.copy_delete() > > arr.copy_append() > > I've come up with adding the functions (not methods at this point) > > deletefrom > insertinto > > appendto (syntatic sugar for concatenate but with a separate argument > for the array and the extra stuff) --- is this needed? not for me. -S. |
From: Travis O. <oli...@ie...> - 2006-08-25 23:16:14
|
Sebastian Haase wrote: > On Friday 25 August 2006 08:01, Travis Oliphant wrote: > >> Travis Oliphant wrote: >> >>>> Now of course: I often needed to "insert" a column, row or section, ... >>>> ? I made a quick and dirty implementation for that myself: >>>> def insert(arr, i, entry, axis=0): >>>> """returns new array with new element inserted at index i along axis >>>> if arr.ndim>1 and if entry is scalar it gets filled in (ref. >>>> broadcasting) >>>> >>>> note: (original) arr does not get affected >>>> """ >>>> if i > arr.shape[axis]: >>>> raise IndexError, "index i larger than arr size" >>>> shape = list(arr.shape) >>>> shape[axis] += 1 >>>> a= N.empty(dtype=arr.dtype, shape=shape) >>>> aa=N.transpose(a, [axis]+range(axis)+range(axis+1,a.ndim)) >>>> aarr=N.transpose(arr, [axis]+range(axis)+range(axis+1,arr.ndim)) >>>> aa[:i] = aarr[:i] >>>> aa[i+1:] = aarr[i:] >>>> aa[i] = entry >>>> return a >>>> >>> Sure, it makes sense to parallel the delete function. >>> >> Although there is already and insert function present in numpy.... >> >> -Travis >> > > Yeah - I saw that ... > maybe one could introduce consistent namings like > arr.copy_insert() > arr.copy_delete() > arr.copy_append() > I've come up with adding the functions (not methods at this point) deletefrom insertinto appendto (syntatic sugar for concatenate but with a separate argument for the array and the extra stuff) --- is this needed? These functions will operate along a particular axis (default is axis=0 to match concatenate). Comments? -Travis |
From: Sebastian H. <ha...@ms...> - 2006-08-25 21:47:22
|
On Friday 25 August 2006 08:01, Travis Oliphant wrote: > Travis Oliphant wrote: > >> Now of course: I often needed to "insert" a column, row or section, ... > >> ? I made a quick and dirty implementation for that myself: > >> def insert(arr, i, entry, axis=0): > >> """returns new array with new element inserted at index i along axis > >> if arr.ndim>1 and if entry is scalar it gets filled in (ref. > >> broadcasting) > >> > >> note: (original) arr does not get affected > >> """ > >> if i > arr.shape[axis]: > >> raise IndexError, "index i larger than arr size" > >> shape = list(arr.shape) > >> shape[axis] += 1 > >> a= N.empty(dtype=arr.dtype, shape=shape) > >> aa=N.transpose(a, [axis]+range(axis)+range(axis+1,a.ndim)) > >> aarr=N.transpose(arr, [axis]+range(axis)+range(axis+1,arr.ndim)) > >> aa[:i] = aarr[:i] > >> aa[i+1:] = aarr[i:] > >> aa[i] = entry > >> return a > > > > Sure, it makes sense to parallel the delete function. > > Although there is already and insert function present in numpy.... > > -Travis Yeah - I saw that ... maybe one could introduce consistent namings like arr.copy_insert() arr.copy_delete() arr.copy_append() for the new ones. This emphasis the fact that a copy is created ... (Append is also a function often asked for when people expect "list capabilities" - did I miss others ?) -Sebastian |
From: Travis O. <oli...@ie...> - 2006-08-25 21:02:01
|
Travis Oliphant wrote: >> Now of course: I often needed to "insert" a column, row or section, ... ? >> I made a quick and dirty implementation for that myself: >> def insert(arr, i, entry, axis=0): >> """returns new array with new element inserted at index i along axis >> if arr.ndim>1 and if entry is scalar it gets filled in (ref. broadcasting) >> >> note: (original) arr does not get affected >> """ >> if i > arr.shape[axis]: >> raise IndexError, "index i larger than arr size" >> shape = list(arr.shape) >> shape[axis] += 1 >> a= N.empty(dtype=arr.dtype, shape=shape) >> aa=N.transpose(a, [axis]+range(axis)+range(axis+1,a.ndim)) >> aarr=N.transpose(arr, [axis]+range(axis)+range(axis+1,arr.ndim)) >> aa[:i] = aarr[:i] >> aa[i+1:] = aarr[i:] >> aa[i] = entry >> return a >> >> > > Sure, it makes sense to parallel the delete function. > Although there is already and insert function present in numpy.... -Travis |
From: Travis O. <oli...@ie...> - 2006-08-25 20:54:21
|
Sebastian Haase wrote: > On Friday 25 August 2006 07:01, Travis Oliphant wrote: > >> Keith Goodman wrote: >> >>> How do I delete a row (or list of rows) from a matrix object? >>> >>> To remove the n'th row in octave I use x(n,:) = []. Or n could be a >>> vector of rows to remove. >>> >>> In numpy 0.9.9.2813 x[[1,2],:] = [] changes the values of all the >>> elements of x without changing the size of x. >>> >>> In numpy do I have to turn it around and construct a list of the rows >>> I want to keep? >>> >> Basically, that is true for now. >> >> I think it would be worth implementing some kind of function for making >> this easier. >> >> One might think of using: >> >> del a[obj] >> >> But, the problem with both of those approaches is that once you start >> removing arbitrary rows (or n-1 dimensional sub-spaces) from an array >> you very likely will no longer have a chunk of memory that can be >> described using the n-dimensional array memory model. >> >> So, you would have to make memory copies. This could be done, of >> course, and the data area of "a" altered appropriately. But, such >> alteration of the memory would break any other objects that have a >> "view" of the memory area of "a." Right now, there is no way to track >> which objects have such "views", and therefore no good way to tell >> (other than the very conservative reference count) if it is safe to >> re-organize the memory of "a" in this way. >> >> So, "in-place" deletion of array objects would not be particularly >> useful, because it would only work for arrays with no additional >> reference counts (i.e. simple b=a assignment would increase the >> reference count and make it impossible to say del a[obj]). >> >> However, a function call that returned a new array object with the >> appropriate rows deleted (implemented by constructing a new array with >> the remaining rows) would seem to be a good idea. >> >> I'll place a prototype (named delete) to that effect into SVN soon. >> >> -Travis >> >> > Now of course: I often needed to "insert" a column, row or section, ... ? > I made a quick and dirty implementation for that myself: > def insert(arr, i, entry, axis=0): > """returns new array with new element inserted at index i along axis > if arr.ndim>1 and if entry is scalar it gets filled in (ref. broadcasting) > > note: (original) arr does not get affected > """ > if i > arr.shape[axis]: > raise IndexError, "index i larger than arr size" > shape = list(arr.shape) > shape[axis] += 1 > a= N.empty(dtype=arr.dtype, shape=shape) > aa=N.transpose(a, [axis]+range(axis)+range(axis+1,a.ndim)) > aarr=N.transpose(arr, [axis]+range(axis)+range(axis+1,arr.ndim)) > aa[:i] = aarr[:i] > aa[i+1:] = aarr[i:] > aa[i] = entry > return a > Sure, it makes sense to parallel the delete function. -Travis |