arr2dict.py 287 B

12345678910111213141516
  1. # -*- coding: utf-8 -*-
  2. """
  3. Created on Thu Jul 5 16:01:56 2018
  4. @author: BI4
  5. """
  6. def arr2dict(x):
  7. """Convierte un array en diccionario."""
  8. d = {}
  9. for i in range(0, x.shape[0]):
  10. for j in range(0, x.shape[1]):
  11. d[i, j] = x[i, j]
  12. return d