title: How can i print a specific value in matrix in python? (Using numpy)
body: <p>I got this code which prints a zero matrix given the size (m x n). But i wanna extract a specific value in a specific location of that matrix but i've tried everything i know and it's still not working. Here's my code:</p>
  <pre><code>import numpy as np 
  
  class Matrix:
  
  def __init__(self, m, n):
    self.row = m
    self.column = n
  
  def define_matrix(self):
    return np.zeros((self.row, self.column), dtype=int)
  
  def __str__(self):
    return self.define_matrix()
  
  def get(self, a, b):
    try:
      if not a in range(self.row+1):
        print('El valor deseado no pertenece a la matriz.')
      elif not b in range(self.column+1):
        print('El valor deseado no pertenece a la matriz.')
      else:
        print(
          'El valor ubicado en la fila {} '
          'y en la columna {} es: {}'
          .format(a, b, self.define_matrix()[a - 1][b - 1]))
    except:
      print('Ingrese datos válidos')
  
  def set(self, value, a, b):
    matrix1 = self.define_matrix()
    if not a in range(self.row+1):
      print('El valor deseado no pertenece a la matriz.')
    elif not b in range(self.column+1):
      print('El valor deseado no pertenece a la matriz.')
    else:
      matrix1[a-1][b-1] = value
      return matrix1
  
  a = Matrix(4, 4) # matrix could be any size
  a.set(80, 1, 3)
  a.get(1, 3)
  </code></pre>
  <p>and here´s what i get:</p>
  <p><img src="https://i.stack.imgur.com/dKW07.png" alt="console image" /></p>