def _derivative_basis_and_coefs(self, coefs, order=1):
    if (order >= self.order):
        return (BSpline(n_basis=1, domain_range=self.domain_range, order=1), np.zeros((len(coefs), 1)))
    deriv_splines = [self._to_scipy_BSpline(coefs[i]).derivative(order) for i in range(coefs.shape[0])]
    deriv_coefs = [BSpline._from_scipy_BSpline(spline)[1] for spline in deriv_splines]
    deriv_basis = BSpline._from_scipy_BSpline(deriv_splines[0])[0]
    return (deriv_basis, np.array(deriv_coefs)[:, 0:deriv_basis.n_basis])
def _derivative_basis_and_coefs(self, coefs, order=1):
    if (order >= self.order):
        return (BSpline(n_basis=1, domain_range=self.domain_range, order=1), np.zeros((len(coefs), 1)))
    deriv_splines = [self._to_scipy_BSpline(coefs[i]).derivative(order) for i in range(coefs.shape[0])]
    deriv_coefs = [BSpline._from_scipy_BSpline(spline)[1] for spline in deriv_splines]
    deriv_basis = BSpline._from_scipy_BSpline(deriv_splines[0])[0]
    return (deriv_basis, np.array(deriv_coefs)[:, 0:deriv_basis.n_basis])