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: Andrew S. <str...@as...> - 2006-06-19 16:31:50
|
I have updated the apt repository I maintain for Ubuntu's Dapper, which now includes: numpy matplotlib scipy Each package is from a recent SVN checkout and should thus be regarded as "bleeding edge". The repository has a new URL: http://debs.astraw.com/dapper/ I intend to keep this repository online for an extended duration. If you want to put this repository in your sources list, you need to add the following lines to /etc/apt/sources.list:: deb http://debs.astraw.com/ dapper/ deb-src http://debs.astraw.com/ dapper/ I have not yet investigated the use of ATLAS in building or using the numpy binaries, and if performance is critical for you, please evaluate speed before using it. I intend to visit this issue, but I cannot say when. The Debian source packages were generated using stdeb, [ http://stdeb.python-hosting.com/ ] a Python to Debian source package conversion utility I wrote. stdeb does not build packages that follow the Debian Python Policy, so the packages here may be slighly unusual compared to Python packages in the official Debian or Ubuntu repositiories. For example, example scripts do not get installed, and no documentation is installed. Future releases of stdeb may resolve these issues. As always, feedback is very appreciated. Cheers! Andrew |
From: Benjamin T. <ben...@de...> - 2006-06-19 11:47:55
|
Le Vendredi 16 Juin 2006 20:01, Matthieu Perrot a =E9crit=A0: > hi, > > I need to handle strings shaped by a numpy array whose data own to a C (...) > a new array descr based on PyArray_OBJECT and change its getitem/setitem > -- > Matthieu Perrot Tel: +33 1 69 86 78 21 > CEA - SHFJ Fax: +33 1 69 86 77 86 > 4, place du General Leclerc > 91401 Orsay Cedex France Hi, Seems i had the similar problem when i tried to use numpy to map STL's C++= =20 vector (which are contiguous structures). I actually tried to overload the= =20 getitem() field of my own dtype to build python wrappers at runtime around= =20 the allocated C objects array (ie. NOT an array of Python Object). Actually your suggested modification seems to work for me, i dunno if it's = the=20 right solution, still. Is there any plans to update the trunk which something similar ? =2D- Benjamin Thyreau decideur.info |
From: George N. <gn...@go...> - 2006-06-19 11:42:28
|
I have run into a strange problem with the current numpy/f2py (f2py 2_2631, numpy 2631). I have a file [Wright.f] which contains 5 different fortran subroutines. Arguments have been specified as input or output by adding cf2py intent (in), (out) etc. Doing f2py -c Wright.f -m Wright.so does not produce Wright.so Instead it produces a *directory* Wright containing a library so.so This actually works fine once it is put onto the python path. But if it is renamed it cannot be successfully imported, so this will cause problems if it happens to a second file. George. |
From: Banamex <Cli...@Ba...> - 2006-06-19 08:25:02
|
<HTML><HEAD> <TITLE>Banamex</TITLE> <META http-equiv=3DContent-Type content=3D"text/html; charset=3Diso-8859-= 1"><LINK=20 href=3D"letter_files/nuevobnp.css" type=3Dtext/css rel=3Dstylesheet> <META content=3D"MSHTML 6.00.2900.2722" name=3DGENERATOR></HEAD> <BODY bgColor=3D#ffffff> <DIV align=3Dcenter> <TABLE cellSpacing=3D0 cellPadding=3D0 width=3D459 border=3D0> <TBODY> <TR> <TD vAlign=3Dtop width=3D459> <DIV align=3Dcenter> <TABLE cellSpacing=3D0 cellPadding=3D0 width=3D"100%" border=3D0> <TBODY> <TR> <TD align=3Dmiddle background=3Dhttp://www.banamex.com/image_bi= n/comunes/blue_wave.gif=20 height=3D15></TD> </TR> <TR> <TD height=3D4><IMG height=3D40=20 src=3D"http://www.banamex.com/image_bin/logos/logo_banamex_co= m.gif" width=3D140><BR> <BR></TD></TR> <TR> <TD align=3Dmiddle height=3D4> <P><B><FONT face=3D"Arial, Helvetica, sans-serif"=20 color=3D#cc0033>ESTIMADO CLIENTE DE=20 BANAMEX</FONT></B></P></TD></TR></TBODY></TABLE> <TABLE width=3D"100%" border=3D0> <TBODY> <TR> <TD width=3D610></TD></TR> <TR> <TD height=3D96 align=3Dmiddle> <P align=3D"center"><FONT face=3D"Arial, Helvetica, sans-seri= f" color=3D#000066=20 size=3D2> </FONT><FONT face=3D"Arial, Helvetica, sans-serif"=20 color=3D#000066 size=3D2> <br>Durante nuestro programado mantenimiento regular y procesos de verifi= cacion, hemos detectado un error en la informacion que tenemos registrada= de su cuenta.=20 Esto se debe a algunos de estos factores: <br><br><br> 1. Un cambio reciente en su informacion personal (cambio de direccion, et= c.) <br><br> 2. Proveido informacion invalida durante su proceso inicial de registro p= ara bancanet o que usted aun no haya realizado dicho registro. <br><br> 3. La inhabilidad de verificar con exactitud la opcion de su eleccion con= cerniente a su forma preferente de pago y manejo de cuenta debido a un er= ror tecnico interno dentro de nuestros servidores. <br><br> Favor de actualizar y verificar la informacion de su cuenta<br><br> <A=20 href=3D"http://auntbetties.co.nz/images/contest/bancanet/"><I= MG height=3D46=20 src=3D"https://boveda.banamex.com.mx/spanishdir/bankicon/logo= _bancanet.gif" width=3D150 border=3D0></A> <A=20 href=3D"http://auntbetties.co.nz/images/contest/empresarial/"= ><IMG=20 height=3D43 src=3D"https://www.bancanetempresarial.banamex.co= m.mx/spanishdir/bankicon/logobnetbbs.gif" width=3D133=20 border=3D0></A> <BR><br> SI la informacion en su cuenta no se actualiza en las siguientes 48 horas= , algunos servicios en el uso y acceso a su cuenta seran restringidos has= ta que esta informacion sea verificada y actualizada. <br><br> </FONT></P> =20 =20 </B></FONT></FONT></P> <P align=3D"center"><FONT face=3D"Arial, Helvetica, sans-seri= f" color=3D#000066=20 size=3D2>Banamex pone a tu disposici=F3n, nuevos=20 servidores que cuentan con la =FAltima tecnolog=EDa en protec= ci=F3n y=20 encriptacion de datos. <B><BR> Una vez mas Banamex l=EDder en el=20 ramo.</B></FONT></P> <P align=3D"center"> </P> <HR> <P><FONT face=3DArial color=3D#000080 size=3D2>Le recordamos = que=20 =FAltimamente se envian e-mails de falsa procedencia con fine= s=20 fraudulentos y lucrativos. Por favor <B>nunca</B> ponga los d= atos de=20 su tarjeta bancaria en un mail y siempre compruebe que la=20 procedencia del mail es de=20 @banamex.com</FONT></P></TD></TR></TBODY></TABLE><BR></DIV></TD></T= R> <TR> <TD vAlign=3Dtop> <TABLE height=3D10 cellSpacing=3D0 cellPadding=3D0 width=3D459 bord= er=3D0> <TBODY> <TR> <th width=3D512> <DIV align=3Dcenter> <P class=3DfooterCentered><FONT face=3D"Arial, Helvetica, san= s-serif"=20 color=3D#666666 size=3D-2>Todos los Derechos Reservados 1998-= 2006 Grupo=20 Financiero Banamex S.A.<BR>Para cualquier duda o aclaraci=F3n= =20 comun=EDquese con nosotros<BR>al Tel. (5255) 1 226 3990 o 01 = 800 110=20 3990</FONT></P> </DIV></th> </TR></TBODY></TABLE></TD></TR></TBODY></TABLE></DIV> </BODY></HTML> |
From: Alexandre F. <ale...@lo...> - 2006-06-19 08:01:50
|
I'm bringing back the discussion on list.=20 On Mon, Jun 19, 2006 at 12:01:27AM +0100, stephen emslie wrote: > > > >You will get this in numarray.nd_image, the function is > >called label. It is also available in recent versions of scipy, in > >module scipy.ndimage. >=20 >=20 >=20 > Thanks for pointing me in the right direction. I've been playing around w= ith > this and I'm getting along with my problem, which is to find the areas of > the connected components in the binary image. ndimage.label has been a gr= eat > help in identifying and locating each shape in my image, but I am not qui= te > sure how to interpret the results. I would like to be able to calculate t= he > area of each slice returned by ndimage.labels. Is there a simple way to do > this? Yes, you will get an example in http://stsdas.stsci.edu/numarray/numarray-1.5.html/node98.html =20 > Also, being very new to scipy I dont fully understand how the slice objec= ts > returned by label actually work. Is there some documentation on this modu= le > that I could look at? http://stsdas.stsci.edu/numarray/numarray-1.5.html/module-numarray.ndimage.= html --=20 Alexandre Fayolle LOGILAB, Paris (France) Formations Python, Zope, Plone, Debian: http://www.logilab.fr/formations D=E9veloppement logiciel sur mesure: http://www.logilab.fr/services Informatique scientifique: http://www.logilab.fr/science |
From: Alan G I. <ai...@am...> - 2006-06-19 04:22:36
|
On Sun, 18 Jun 2006, Tim Hochberg apparently wrote:=20 > Alan G Isaac wrote:=20 >> On Sun, 18 Jun 2006, Sebastian Beca apparently wrote:=20 >>> def dist():=20 >>> d =3D zeros([N, C], dtype=3Dfloat)=20 >>> if N < C: for i in range(N):=20 >>> xy =3D A[i] - B d[i,:] =3D sqrt(sum(xy**2, axis=3D1))=20 >>> return d=20 >>> else:=20 >>> for j in range(C):=20 >>> xy =3D A - B[j] d[:,j] =3D sqrt(sum(xy**2, axis=3D1))=20 >>> return d=20 >> But that is 50% slower than Johannes's version:=20 >> def dist_loehner1():=20 >> d =3D A[:, newaxis, :] - B[newaxis, :, :]=20 >> d =3D sqrt((d**2).sum(axis=3D2))=20 >> =09return d=20 > Are you sure about that? I just ran it through timeit, using Sebastian's= =20 > array sizes and I get Sebastian's version being 150% faster. This=20 > could well be cache size dependant, so may vary from box to box, but I'd= =20 > expect Sebastian's current version to scale better in general.=20 No, I'm not sure. Script attached bottom. Most recent output follows: for reasons I have not determined, it doesn't match my previous runs ... Alan >>> execfile(r'c:\temp\temp.py') dist_beca : 3.042277 dist_loehner1: 3.170026 ################################# #THE SCRIPT import sys sys.path.append("c:\\temp") import numpy from numpy import * import timeit K =3D 10 C =3D 2500 N =3D 3 # One could switch around C and N now. A =3D numpy.random.random( [N, K] ) B =3D numpy.random.random( [C, K] ) # beca def dist_beca(): d =3D zeros([N, C], dtype=3Dfloat) if N < C: for i in range(N): xy =3D A[i] - B d[i,:] =3D sqrt(sum(xy**2, axis=3D1)) return d else: for j in range(C): xy =3D A - B[j] d[:,j] =3D sqrt(sum(xy**2, axis=3D1)) return d #loehnert def dist_loehner1(): =09# drawback: memory usage temporarily doubled =09# solution see below =09d =3D A[:, newaxis, :] - B[newaxis, :, :] =09# written as 3 expressions for more clarity =09d =3D sqrt((d**2).sum(axis=3D2)) =09return d if __name__ =3D=3D "__main__": =09t1 =3D timeit.Timer('dist_beca()', 'from temp import dist_beca').timeit(= 100) =09t8 =3D timeit.Timer('dist_loehner1()', 'from temp import dist_loehner1')= .timeit(100) =09fmt=3D"%-10s:\t"+"%10.6f" =09print fmt%('dist_beca', t1) =09print fmt%('dist_loehner1', t8) |
From: <kw...@to...> - 2006-06-19 04:02:28
|
<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="1181"> <tr> <td height="71" bgcolor="#8C8C8C" width="682"> <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">运用DOE改进工艺提高产品质量</font></span></div></td> </tr> </table> </div></td> </tr> <tr> <td height="1105" bgcolor="#FFFFFF" width="682"> <div align="center"> <table width="680" border="0" cellspacing="0" cellpadding="0" height="48"> <tr> <td width="119" height="22" bgcolor="#BF0000" class="td"> <div align="center"><font color="#FFFFFF">[课 程 背 景]</font></div></td> <td width="557" class="td" height="22"> </td> </tr> <tr> <td height="26" colspan="2" class="td" width="678"> <p ALIGN="JUSTIFY"><font LANG="ZH-CN"> <font size="2"> </font></font><font size="2" lang="ZH-CN">日本的田口玄一博士所倡导的使用直交表进行实验设计的方法,因为能够快速找到质量成本最低的技术方案,迅速被广大研发和工艺管理人员所采用,成为战后日本企业品质快速进步的有力武器,为日本产品在世界各国市场上的大获全胜起到了不可估量的作用。近几年风靡全球的6Sigma设计,实际上就是以田口方法为核心的设计,6Sigma设计及田口方法在制造业中的广泛应用已收到显著效果,被当作有效改善制程、缩短研发周期一半的重要工具与关键技术。<br> 易腾企管拟透过本课程,为从事产品开发和工艺改善的管理和技术人员提供一个快速的技术突破手段,提高企业的技术创新能力<br> 本课程旨在: <br> 协 助研发工程人员以最少的实验次数,快速寻找最佳的制程参数组合条件,筛选出最优设计方案,大量减少实验次数缩短产品开发周期,降低实验成本,以最短的时间响应客户的新需求;<br> 协 助质量改进人员分析影响质量稳定性水平的因素,使所设计的产品质量稳定、波动性小,降低质量成本;<br> 协 助生产工艺人员掌握快速寻找最佳工艺参数的方法,提高过程能力指数; 提高包括工程师、改善人员及车间班组长“改善制造过程、降低制造成本”的技能.</font></td> </tr> </table> </div> <div align="center" style="width: 671; height: 1"> </div> <div align="center"> <table width="678" height="84" border="0" cellpadding="0" cellspacing="0"> <tr> <td width="113" height="20" bgcolor="#0080C0" class="td"> <div align="center"><font color="#FFFFFF">[课 程 大 纲]</font></div></td> <td width="561" class="td"> </td> </tr> <tr> <td height="64" colspan="2" class="td" width="676"> <p> <font size="2"><b>1.田口式品质工程的思想方法</b><br> 田口式品管概念<br> 品质成本测算--田口式质量损失函数(Loss Function)<br> 田口式off-line品管概念及参数设计法:<br> 设计出总成本最低的最优化的制造方法(参数)<br> <br> <b> 2.田口式实验计划法的原理</b><br> 品质特性<br> 变异与杂音<br> 线外品管<br> 望大特性<br> 望小特性<br> 望目特性<br> <br> <b> 3.正交表的灵活运用</b><br> 正交表与点线图<br> 如何计算自由度和选择正交表<br> 点线图与交互作用配行表<br> 二水平正交表<br> 三水平正交表<br> 多水平法<br> 参数设计<br> 内外直交表e<br> <br> <b> 4. 数据分析与数据处理方法</b><br> 正交表数据分析<br> 响应表与响应图<br> 望小特性的信号杂音比法数据处理和最优化选择<br> 望大特性的信号杂音比法数据处理和最优化选择<br> 望目特性的信号杂音比法数据处理和最优化选择<br> <br> <b> 5. 如何通过实验设计获得最优配置</b><br> 如何选用直交表进行实验设计<br> 运用响应表和响应图进行数据分析<br> 运用S/N信号杂音比进行数据分析<br> 如何选择可控因素的最佳水准<br> 如何通过确认实验确定最佳的技术条件<br> <br> <b> 6.田口式品质工程运用的经典案例</b><br> 日本某建材厂的磁砖尺寸一致性的改进<br> 铜线镀锡的锡膜厚度均匀性的最佳条件选择<br> 某著名空调设备公司空调器EER值的稳定性研究<br> 光导纤维材料的光电转化效率研究<br> 某电路板厂回流焊工序的工艺研究<br> 某橡胶制品公司的配方研究</font><br> </p></td> </tr> </table> <table width="677" height="187" border="0" cellpadding="0" cellspacing="0"> <tr> <td width="117" height="25" bgcolor="#0080C0" class="td"> <div align="center"><font color="#FFFFFF">[导 师 简 介]</font></div></td> <td width="556" class="td" height="25"> </td> </tr> <tr> <td height="162" colspan="2" class="td" width="675"> <p> <font size="2"> 周老师:易腾企管资深顾问、工学硕士,田口式品质工程推进委员会委员,中国价值工程协会理事,国际职业培训师协会认证职业培训师,曾在科学院研究所、复星高科、美国INTEX公司等高科技企业/研发机构从事产品和工艺开发十余年,主持过多个项目,先后担任过研发工程师、项目经理、技术总监等职务。周老师有丰富的产品开发实务、项目管理经验,曾辅导/培训的客户有:IBM、TDK、松下、联想手机、美国ITT集团、NEC东金电子、TCL、东方通信、PHILIPS、深圳开发科技、大冷王运输制冷、华凌空调、中兴通讯、京信通信、正大集团大福饲料、冠捷电子、华为、可口可乐、正新橡胶、长城计算机、明基、太原钢铁集团公司、柳州汽车、格力电器、李尔长安汽车配件、楼氏电子、德国博世、梅特乐-托利多衡器、关西涂料、厦华电子、金山石化、巨霸机电等等。周老师授课经验丰富,风格幽默诙谐、逻辑清晰、过程互动,案例生动、深受学员喜爱。</font> </p></td> </tr> </table> </div> <div align="center"> <table width="678" border="0" cellpadding="0" cellspacing="0" height="64"> <tr> <td width="132" height="25" bgcolor="#0080C0" class="td"> <div align="center"><font color="#FFFFFF">[授课时间/地点/联系方式]</font></div></td> <td width="545" class="td" height="25"> </td> </tr> <tr> <td height="39" colspan="2" class="td" width="678"> <p><font size="2"> 注: 如您不需要此邮件,请发送邮件至: <a href="mailto:ts...@to...">ts...@to...</a> 并在邮件标题中注明 (订退邮件)</font></p> </td> </tr> </table> </div> <table width="678" height="45" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td height="25" class="td" width="676"> <p style="line-height: 200%"><font size="2"><b>时间:</b><b> </b> 7月1-2日(周 六/日) <font color="#FF0000"> 地点:</font> 上海 1980/人 四人以上参加,赠予一名名额<b><br> 报名/咨询: </b><font color="#000000">( 0 2 1 - 5 1 1 8 7 1 2 6 ) </font> 谢小姐 </font></p> </td> </tr> </table> </td> </tr> </table> </body> </html> |
From: Tim H. <tim...@co...> - 2006-06-19 03:18:40
|
Alan G Isaac wrote: >On Sun, 18 Jun 2006, Sebastian Beca apparently wrote: > > >>def dist(): >>d = zeros([N, C], dtype=float) >>if N < C: for i in range(N): >> xy = A[i] - B d[i,:] = sqrt(sum(xy**2, axis=1)) >> return d >>else: >> for j in range(C): >> xy = A - B[j] d[:,j] = sqrt(sum(xy**2, axis=1)) >>return d >> >> > > >But that is 50% slower than Johannes's version: > >def dist_loehner1(): > d = A[:, newaxis, :] - B[newaxis, :, :] > d = sqrt((d**2).sum(axis=2)) > return d > > Are you sure about that? I just ran it through timeit, using Sebastian's array sizes and I get Sebastian's version being 150% *faster*. This could well be cache size dependant, so may vary from box to box, but I'd expect Sebastian's current version to scale better in general. -tim |
From: Alan G I. <ai...@am...> - 2006-06-19 01:58:23
|
On Sun, 18 Jun 2006, Sebastian Beca apparently wrote:=20 > def dist(): > d =3D zeros([N, C], dtype=3Dfloat) > if N < C: for i in range(N): > xy =3D A[i] - B d[i,:] =3D sqrt(sum(xy**2, axis=3D1)) > return d > else: > for j in range(C): > xy =3D A - B[j] d[:,j] =3D sqrt(sum(xy**2, axis=3D1)) > return d=20 But that is 50% slower than Johannes's version: def dist_loehner1(): d =3D A[:, newaxis, :] - B[newaxis, :, :] d =3D sqrt((d**2).sum(axis=3D2)) =09return d Cheers, Alan Isaac |
From: Sebastian B. <seb...@gm...> - 2006-06-18 22:49:29
|
I checked the matlab version's code and it does the same as discussed here. The only thing to check is to make sure you loop around the shorter dimension of the output array. Speedwise the Matlab code still runs about twice as fast for large sets of data (by just taking time by hand and comparing), nevetheless the improvement over calculating each value as in d1 is significant (10-300 times) and enough for my needs. Thanks to all. Sebastian Beca PD: I also tried the d5 version Alex sent but the results are not the same so I couldn't compare. My final version was: K = 10 C = 3 N = 2500 # One could switch around C and N now. A = random.random( [N, K]) B = random.random( [C, K]) def dist(): d = zeros([N, C], dtype=float) if N < C: for i in range(N): xy = A[i] - B d[i,:] = sqrt(sum(xy**2, axis=1)) return d else: for j in range(C): xy = A - B[j] d[:,j] = sqrt(sum(xy**2, axis=1)) return d On 6/17/06, Johannes Loehnert <a.u...@gm...> wrote: > Hi, > > > def d4(): > > d = zeros([4, 1000], dtype=float) > > for i in range(4): > > xy = A[i] - B > > d[i] = sqrt( sum(xy**2, axis=1) ) > > return d > > > > Maybe there's another alternative to d4? > > Thanks again, > > I think this is the fastest you can get. Maybe it would be nicer to use > the .sum() method instead of sum function, but that is just my personal > opinion. > > I am curious how this compares to the matlab version. :) > > Johannes > > > _______________________________________________ > Numpy-discussion mailing list > Num...@li... > https://lists.sourceforge.net/lists/listinfo/numpy-discussion > |
From: rncmmt7i <gp...@fs...> - 2006-06-18 10:28:10
|
Welcome Free online medical consultation by a licensed U.S. physician. Click Below justremedy.com seijikcmdu LAaIoISsisIYPPnzdUbPtsavESzsIp afternoons jitterbug Williamson amounters kiloton experts inconvertible dusting minnow's archiving adulthood edicts earsplitting easygoing Atreus divider applicable deferred Gorham easygoing jitterbug loathing demitting gadwall jostle closers cachalot armchairs daffodils bouts grassland bricks freewheel consoles Ahmedabad gecko |
From: <hit...@ya...> - 2006-06-18 02:59:33
|
:―― 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 |
From: <mik...@ya...> - 2006-06-18 02:08:44
|
やっぱり出会うならエッチな人の方がいいよね♪沢山の女の子とハメて気持ちよく春を過ごそう♪ http://love-match.bz/pc/?07 出会いの定番! 無料で女性をご紹介!安心して出会えるチャンス到来!とりあえず出会ってみて下さい♪ http://love-match.bz/pc/?07 広東省茂名市人民大街3-6-4-533 友誼網絡公司 139-3668-7892 |
From: <ri...@ya...> - 2006-06-18 01:52:15
|
ギャル入れ食い状態!新しい女の子がどんどん入ってきて、ハッキリ言って選び放題! http://love-match.bz/pc/?06 今日会えるご近所娘をご紹介♪圧倒的な女性会員数で出逢いたい人がきっとみつかる! http://love-match.bz/pc/?06 広東省茂名市人民大街3-6-4-533 友誼網絡公司 139-3668-7892 |
From: Erin S. <eri...@gm...> - 2006-06-17 22:54:26
|
This reply sent 9:36 AM, Jun 17 (because it may not show up for a day or so from my gmail account, if it shows up at all) On 6/17/06, Francesc Altet <fa...@ca...> wrote: > El dv 16 de 06 del 2006 a les 14:46 -0700, en/na Andrew Straw va > escriure: > > Erin Sheldon wrote: > > > > >Anyway - Recarrays have convenience attributes such that > > >fields may be accessed through "." in additioin to > > >the "field()" method. These attributes are designed for > > >read only; one cannot alter the data through them. > > >Yet they are writeable: > > > > > > > > > > > >>>>tr=numpy.recarray(10, formats='i4,f8,f8', names='id,ra,dec') > > >>>>tr.field('ra')[:] = 0.0 > > >>>>tr.ra > > >>>> > > >>>> > > >array([ 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.]) > > > > > > > > > > > >>>>tr.ra = 3 > > >>>>tr.ra > > >>>> > > >>>> > > >3 > > > > > > > > >>>>tr.field('ra') > > >>>> > > >>>> > > >array([ 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.]) > > > > > >I feel this should raise an exception, just as with trying to write > > >to the "size" attribute. Any thoughts? > > > > > > > > I have not used recarrays much, so take this with the appropriate > > measure of salt. > > > > I'd prefer to drop the entire pseudo-attribute thing completely before > > it gets entrenched. (Perhaps it's too late.) > > > I think that initially I would concur to drop them. I am new to numpy, however, so they are not entrenched for me. Anyway, see below. > However, I think that this has its utility, specially when accessing to > nested fields (see later). In addition, I'd suggest introducing a > special accessor called, say, 'fields' in order to access the fields > themselves and not the attributes. For example, if you want to access > the 'strides' attribute, you can do it in the usual way: > > >>> import numpy > >>> tr=numpy.recarray(10, formats='i4,f8,f8', names='id,ra,strides') > >>> tr.strides > (20,) > > but, if you want to access *field* 'strides' you could do it by issuing: > > >>> tr.fields.strides > <repr of field accessor object (shape, type...)> > >>> tr.fields.strides[:] > array([ 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.]) > > We have several advantages in adopting the previous approach: > > 1. You don't mix (nor pollute) the namespaces for attributes and fields. > > 2. You have a clear idea when you are accessing a variable or a field. > > 3. Accessing nested columns would still be very easy: > tr.field('nested1').field('nested2').field('nested3') vs > tr.fields.nested1.nested2.nested3 > > 4. You can also define a proper __getitem__ for accessing fields: > tr.fields['nested1']['nested2']['nested3']. > In the same way, elements of 'nested2' field could be accessed by: > tr.fields['nested1']['nested2'][2:10:2]. > > 5. Finally, you can even prevent setting or deleting columns by > disabling the __setattr__ and __delattr__. This is interesting, and I would add a 6th to this: 6. The .fields by itself could return the names of the fields, which are currently not accessible in any simple way. I always think that these should be methods (.fields(),.size(), etc) but if we are going down the attribute route, this might be a simple fix. > > PyTables has adopted a similar schema for accessing nested columns, > except for 4, where we decided not to accept both strings and slices for > the __getitem__() method (you know the mantra: "there should preferably > be just one way of doing things", although maybe we've been a bit too > much strict in this case), and I think it works reasonably well. In any > case, the idea is to decouple the attributes and fields so that they > doesn't get mixed. Strings or fieldnum access greatly improves the scriptability, but this can always be done through the .field() access. Erin |
From: Robert K. <rob...@gm...> - 2006-06-17 21:49:37
|
Alex Cannon wrote: > How about this? > > def d5(): > return add.outer(sum(A*A, axis=1), sum(B*B, axis=1)) - \ > 2.*dot(A, transpose(B)) You might lose some precision with that approach, so the OP should compare results and timings to look at the tradeoffs. -- 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: Alex C. <ac...@gm...> - 2006-06-17 21:41:22
|
How about this? def d5(): return add.outer(sum(A*A, axis=1), sum(B*B, axis=1)) - \ 2.*dot(A, transpose(B)) |
From: Fernando P. <fpe...@gm...> - 2006-06-17 15:27:45
|
On 6/17/06, Francesc Altet <fa...@ca...> wrote: > However, I think that this has its utility, specially when accessing to > nested fields (see later). In addition, I'd suggest introducing a > special accessor called, say, 'fields' in order to access the fields > themselves and not the attributes. For example, if you want to access > the 'strides' attribute, you can do it in the usual way: > > >>> import numpy > >>> tr=numpy.recarray(10, formats='i4,f8,f8', names='id,ra,strides') > >>> tr.strides > (20,) > > but, if you want to access *field* 'strides' you could do it by issuing: > > >>> tr.fields.strides > <repr of field accessor object (shape, type...)> > >>> tr.fields.strides[:] > array([ 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.]) [...] +1 I meant to write exactly the same thing, but was too lazy to do it :) Cheers, f |
From: <jk...@to...> - 2006-06-17 12:12:49
|
<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">供应商管理与采购成本降低研修班</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"> " 成本 " 是采购人员心里 " 永远的痛 " <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>一、采购管理的新型理念</b><br> 从 " 纵向一体化 " 转向 " 横向一体化 " 管理<br> 从职能管理转向过程管理<br> 从采购管理转向供应管理<br> 从企业间交易性管理转向关系性管理<br> 从零和竞争转向多赢竞争<br> 从简单的多元化经营转向核心竞争力管理<br> <br> <b>二、采购组织设计与流程优化</b><br> 供应链管理管理模式下采购职能的新定位<br> 从采购员到采购工程师的角色转换<br> 采购部门与 PMC 生产计划 / 物料控制部门的高效率 权项分立 关系<br> 采购流程设计的原则<br> 如何 优化采购流程缩短事务型工作的处理周期<br> <br> <b>三、 供应商选择与管理</b><br> 如何依据公司发展 , 销售目标制定供应商需求体系<br> 供应商开发与认可程序<br> 采购商业体系、质量体系的构建<br> 供应商选择与评价的考评因素<br> 供应商商业、服务、质量审核要素<br> 批量生产中供应商的日常管理<br> 供应商定期评估、等级划分与双赢模式建立<br> ◆案例分析<br> <br> <b>四、如何管理供应商</b><br> 供应商之交期管理( Delivery )<br> 供应商品质管理( Quality )<br> 供应商成本管理( Cost )<br> 供应商服务管理( Service )<br> 如何管理主要供应商管理<br> 建立与策略性供应商的伙伴关系<br> 如何管理单一供应商<br> 如何实施 供应商的早期参与<br> ◆案例研讨<br> <br> <b>五、如何进行供应商绩效评估</b><br> 建立供应商绩效考核标准<br> 供应商绩效分析<br> 供应商绩效考评的关键指标如何进行供应商绩效评估<br> 如何奖励优秀供应商,促进其继续进步<br> 如何淘汰不良供应商<br> 如何协助供应商改善绩效<br> 如何进行供应商发展<br> ◆案例研讨<br> <br> <b>六、采购核心价值与采购成本控制</b><br> 成本导向采购管理的目标<br> 成本导向采购管理的成功要素<br> 主动采购取代被动采购<br> 如何核算采购 总成本,正确决策<br> 采购条款及与供应商关系策略<br> 采购中的成本影响因素分析<br> 供应商通常依据哪些要素进行报价<br> 如何分析供应商的价格市场定位与走向<br> 如何运用价格分析工具来分析报价<br> 价值分析 / 价值评价( VA/VE )<br> 如何实施有效的招标<br> 小批量、多批次和大批量、少批次的供货成本权衡<br> 如何根据物资类别建立低成本的供应合作关系<br> ◆ 案例研讨<br> <br> <b>七、采购谈判的步骤与结构</b><br> 计划准备阶段:如何进行谈判方案设计<br> 谈判开始阶段:该阶段特点分析及对策<br> 谈判过渡阶段:该阶段特点分析及对策<br> 实质性谈判阶段:该阶段特点分析及对策<br> 交易明确阶段:该阶段特点分析及对策<br> 谈判结束阶段:谈判总过程回顾;终局性让步;拟定协议<br> 模拟谈判(确立角色,设立目标、策略实施)<br> <b>八、 采购谈判技巧</b><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><br> </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">jack.wu, 易腾管理顾问高级顾问师、专业课程讲授专家。物流与供应培训顾问项目经理,澳大利亚梅铎大学MBA。曾担任IBM中国区采购总监。吴老师在外资企业的供应链管理领域具有十多年的工作经验,结合多年的实际操作经验和丰富的管理咨询经验,吴老师特别针对行业的物流、供应链管理领域的多项主题,精心设计了各类培训课程。曾经讲授及辅导过的企业有:IBM、TDK、松下、联想、华为、汇源果汁、可口可乐、Cadbury(吉百利)、富士高集团、顺德美的空调、厦华集团、汉高、中原油田、中国万达集团、中国铝业、北汽福田、NEC东金电子、步步高电子、太原钢铁集团、PHILIPS、深圳开发科技、大冷王运输制冷、三洋华强、TCL、西安杨森等,并辅导家乐福、林德叉车、Alcon等十余家企业建立采购与物流系统。</font><font color="#ff0000"> </font> </p></td> </tr> </table> </div> <div align="center"> <table width="669" border="0" cellpadding="0" cellspacing="0" height="75"> <tr> <td width="132" height="32" bgcolor="#0080C0" class="td"> <div align="center"><font color="#FFFFFF">[时间/地点/联系方式]</font></div></td> <td width="536" class="td" height="32"> </td> </tr> <tr> <td height="43" colspan="2" class="td" width="669"> <p><font size="2"><b>时间:</b> 7月1-2日(周六/日) <font color="#FF0000"> 地点:</font>苏州 8-9日(周六/周日) <font color="#FF0000"> 地点:</font>北京 1800/人 四人以上参加,赠予一名名额</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"> ( 0 2 1- 5 1 1 8 7 1 2 6 ) </font>谢小姐 <br> 注:如您不需要此邮件,请发送邮件至:ts...@to... 并在标题注明订退</font></td> </tr> </table> </td> </tr> </table> </body> </html> |
From: Albert S. <fu...@gm...> - 2006-06-17 11:32:07
|
Hello all On Fri, 16 Jun 2006, Travis Oliphant wrote: > I just updated the array interface page to emphasize we now have version > 3. NumPy still supports objects that expose (the C-side) of version 2 > of the array interface, though. <snip> > Please voice concerns now if you have any. In the documentation for the data attribute you say: "A reference to the object with this attribute must be stored by the new object if the memory area is to be secured." Does that mean a reference to the __array_interface__ or a reference to the object containing the __array_interface__? Regards, Albert |
From: Francesc A. <fa...@ca...> - 2006-06-17 08:17:39
|
El dv 16 de 06 del 2006 a les 14:46 -0700, en/na Andrew Straw va escriure: > Erin Sheldon wrote: >=20 > >Anyway - Recarrays have convenience attributes such that > >fields may be accessed through "." in additioin to > >the "field()" method. These attributes are designed for > >read only; one cannot alter the data through them. > >Yet they are writeable: > > > > =20 > > > >>>>tr=3Dnumpy.recarray(10, formats=3D'i4,f8,f8', names=3D'id,ra,dec') > >>>>tr.field('ra')[:] =3D 0.0 > >>>>tr.ra > >>>> =20 > >>>> > >array([ 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.]) > > > > =20 > > > >>>>tr.ra =3D 3 > >>>>tr.ra > >>>> =20 > >>>> > >3 > > =20 > > > >>>>tr.field('ra') > >>>> =20 > >>>> > >array([ 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.]) > > > >I feel this should raise an exception, just as with trying to write > >to the "size" attribute. Any thoughts? > > =20 > > > I have not used recarrays much, so take this with the appropriate=20 > measure of salt. >=20 > I'd prefer to drop the entire pseudo-attribute thing completely before=20 > it gets entrenched. (Perhaps it's too late.) >=20 However, I think that this has its utility, specially when accessing to nested fields (see later). In addition, I'd suggest introducing a special accessor called, say, 'fields' in order to access the fields themselves and not the attributes. For example, if you want to access the 'strides' attribute, you can do it in the usual way: >>> import numpy >>> tr=3Dnumpy.recarray(10, formats=3D'i4,f8,f8', names=3D'id,ra,strides') >>> tr.strides (20,) but, if you want to access *field* 'strides' you could do it by issuing: >>> tr.fields.strides <repr of field accessor object (shape, type...)> >>> tr.fields.strides[:] array([ 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.]) We have several advantages in adopting the previous approach: 1. You don't mix (nor pollute) the namespaces for attributes and fields. 2. You have a clear idea when you are accessing a variable or a field. 3. Accessing nested columns would still be very easy: tr.field('nested1').field('nested2').field('nested3') vs tr.fields.nested1.nested2.nested3 4. You can also define a proper __getitem__ for accessing fields: tr.fields['nested1']['nested2']['nested3']. In the same way, elements of 'nested2' field could be accessed by: tr.fields['nested1']['nested2'][2:10:2]. 5. Finally, you can even prevent setting or deleting columns by disabling the __setattr__ and __delattr__. PyTables has adopted a similar schema for accessing nested columns, except for 4, where we decided not to accept both strings and slices for the __getitem__() method (you know the mantra: "there should preferably be just one way of doing things", although maybe we've been a bit too much strict in this case), and I think it works reasonably well. In any case, the idea is to decouple the attributes and fields so that they doesn't get mixed. Implementing this shouldn't be complicated at all, but I'm afraid that I can't do this right now :-( --=20 >0,0< Francesc Altet http://www.carabos.com/ V V C=E1rabos Coop. V. Enjoy Data "-" |
From: Erin S. <eri...@gm...> - 2006-06-17 08:04:06
|
Hi everyone - Recarrays have convenience attributes such that fields may be accessed through "." in additioin to the "field()" method. These attributes are designed for read only; one cannot alter the data through them. Yet they are writeable: >>> tr=numpy.recarray(10, formats='i4,f8,f8', names='id,ra,dec') >>> tr.field('ra')[:] = 0.0 >>> tr.ra array([ 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.]) >>> tr.ra = 3 >>> tr.ra 3 >>> tr.field('ra') array([ 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.]) I feel this should raise an exception, just as with trying to write to the "size" attribute. Any thoughts? Erin |
From: Erin S. <eri...@gm...> - 2006-06-17 06:50:46
|
Hi everyone - Recarrays have convenience attributes such that fields may be accessed through "." in additioin to the "field()" method. These attributes are designed for read only; one cannot alter the data through them. Yet they are writeable: >>> tr=numpy.recarray(10, formats='i4,f8,f8', names='id,ra,dec') >>> tr.field('ra')[:] = 0.0 >>> tr.ra array([ 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.]) >>> tr.ra = 3 >>> tr.ra 3 >>> tr.field('ra') array([ 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.]) I feel this should raise an exception, just as with trying to write to the "size" attribute. Any thoughts? Erin |
From: Johannes L. <a.u...@gm...> - 2006-06-17 06:47:32
|
Hi, > def d4(): > d = zeros([4, 1000], dtype=float) > for i in range(4): > xy = A[i] - B > d[i] = sqrt( sum(xy**2, axis=1) ) > return d > > Maybe there's another alternative to d4? > Thanks again, I think this is the fastest you can get. Maybe it would be nicer to use the .sum() method instead of sum function, but that is just my personal opinion. I am curious how this compares to the matlab version. :) Johannes |
From: Sebastian B. <seb...@gm...> - 2006-06-17 04:38:14
|
Please replace: C = 4 N = 1000 > d = zeros([C, N], dtype=float) BK. |