I have problem with matrices in python

0

I have problems, I can not assign the complete data to the vector, it must be complete in the matrix and I could not, since I try to change the data type of the matrix, it does not give me.

enter the description of the link here

import random
import numpy as np
import  math as mt 

m=10
n=3

datos = np.zeros((m,n), dtype= str )

for i in range(m):

    X1= random.random()*63
    datos[i,0] =X1

for i in range(m):

    XB=(int(datos[i,0]))
    XBD=(int((mt.modf(X1)[0]*100)))

    XB1=bin(XB)[2:]
    XB2=bin(XBD)[2:]

    XB1=( "{:06d}".format (int(XB1)))
    XB2=( "{:07d}".format (int(XB2)))

    BX= XB1 + XB2

    datos[i,1] = BX

print(datos)
    
asked by eferes21 18.03.2018 в 03:46
source

0 answers