He solucionado el problema de la siguiente forma:

   1. *from numpy import **
   2. *data = [[] for dummy in xrange(13)]*
   3. *archivo = open('../data/TI_1_0004.txt', 'r')*
   4. *archivo.readline()*
   5. *
   *
   6. *for line in archivo:*
   7. *    fields = line.strip().split('\t')*
   8. *    for i, number in enumerate(fields):*
   9. *        data[i].append(number)*
   10. *rec.array(data,float)        *
   11. *
   *
   12. *m=int(shape(data)[1])*
   13. *n=m/33*
   14. *for x in range(m):*
   15. *    a = data[1][x]    *
   16. *    tmp[1][x] = a*
   17. *LONGIT = []*
   18. *LONGIT= tmp[1][:]*
   19. *array(LONGIT)*
   20. *LONGIT.shape = ((m/33),33)*

Cualquier sugerencia sobre esta solucion sera bienvenida.

-- 
Juan Camilo Hernández Díaz
Ingeniero Sanitario
_______________________________________________
Python-es mailing list
Python-es@python.org
http://mail.python.org/mailman/listinfo/python-es
FAQ: http://python-es-faq.wikidot.com/

Responder a