[MATRIX-SIG] hash() function w/ NumPy

Hoon Yoon - IPT Quant hyoon@nyptsrv1.etsd.ml.com
Fri, 25 Jul 1997 12:54:47 -0400


div_prj =3D []
id_lst  =3D []
for i in range(0,len(prj_divs),1):
	div_spstr      =3D string.split(prj_divs[i])
	id =3D div_spstr[3]
=04	if not id_lst.count(id): id_lst.append(id)
=09
div_prj.append([id_lst.index(id),chkdate(div_spstr[0]),eval(div_spstr[1])=
])

div_prj =3D array(div_prj)

Thank Aaron:

   Here's something I came up with. Basically a similar idea, but it =
keeps
   list of id_lst, which I can be pointed right back by the array =
div_prj.
   This is not horribly bad, since it does do what I wanted with out =
reverse
   of hash. I guess, I need to come up with Qstrategy for comparing =
indicies
   from 2 matricies and print function that grabs original names back, =
etc...
  =20
   I am still unused to the idea that Python could pretty much do =
anything.
   I can probably class these things and get back something extremely =
similar,
   but better than Gauss's way of handling stuff. Although result may be =
bit
   slower than single purpose Gauss, I can be much more creative.
  =20
'till I see you,

Hoon,
   

_______________
MATRIX-SIG  - SIG on Matrix Math for Python

send messages to: matrix-sig@python.org
administrivia to: matrix-sig-request@python.org
_______________