code: def basis_function_all(degree, knot_vector, span, knot):
      
      N = [[None for _ in range(degree + 1)] for _ in range(degree + 1)]
      for i in range(0, degree + 1):
          bfuns = basis_function(i, knot_vector, span, knot)
          for j in range(0, i + 1):
              N[j][i] = bfuns[j]
      return N
docs: Computes all non-zero basis functions of all degrees from 0 up to the input degree for a single parameter.
  
      A slightly modified version of Algorithm A2.2 from The NURBS Book by Piegl & Tiller.
  
      :param degree: degree, :math:`p`
      :type degree: int
      :param knot_vector:  knot vector, :math:`U`
      :type knot_vector: list, tuple
      :param span: knot span, :math:`i`
      :type span: int
      :param knot: knot or parameter, :math:`u`
      :type knot: float
      :return: basis functions
      :rtype: list