human
Write me a the Python code you requested given the following:
I am working on the file "Alumnos/jorge_altamirano/Tarea1.ipynb".
The first task is:
<span style="color: red"> EJERCICIO 3 </span>
Función para crear arrays "vacíos" (en ceros)
Can you write Python code for it?
assistant
#Here is the Python code you requested.

import re
import numpy as np

class zeros:
    "Clase para llenar una matriz en Ceros"
    data = list()
    shape = None
    def __init__(self, shape):
        "Constructor"
        self.data = list()
        print(shape)
        for i in range(0, shape[1]):
            self.data.append(list())
            for j in range(0, shape[0]):
                self.data[i].append(list())
                self.data[i][j] = 0.
                #self.data[i].append(list())
            #    self.data[i][j] = 0
        self.shape = shape
        #self.data = np.zeros(shape)
    def eye(self):
        if self.shape[0] != self.shape[1]:
            raise Exception("Ejercicio 3: las columnas y las filas deben ser de igual número n = m")
        for i in range(0,self.shape[1]):
            for j in range(0, self.shape[0]):
                if(i == j):
                    self.data[i][j] = 1.0
    def __repr__(self):
        retval = "[\n"
        for list in self.data:
            retval += "["
            for x in list:
                retval += str(x) + ", "
            retval += "], \n"
        retval = retval + "]"
        return retval.replace(", ]", "]")
    def __str__(self):
        return self.__repr__()
        #return "Ejercicio 1: print"
    def __getitem__(self, index):
        return(self.data[index[0]][index[1]])
    def __setitem__(self, index, newval):
        self.data[index[0]][index[1]] = newval
        return

X = zeros([3,4])
X

X.eye()
X

X = zeros((4, 4))
X.eye()
X