From d070d883b03aa97ddcc41f4b6598b3f8008f4978 Mon Sep 17 00:00:00 2001 From: hyrodium Date: Tue, 17 Oct 2023 00:05:21 +0900 Subject: [PATCH] add more `BSplineSpace` constructor --- src/_BSplineSpace.jl | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/_BSplineSpace.jl b/src/_BSplineSpace.jl index cbb5c20ba..08aff29f9 100644 --- a/src/_BSplineSpace.jl +++ b/src/_BSplineSpace.jl @@ -54,6 +54,9 @@ end function BSplineSpace{p,T,K}(P::BSplineSpace{p}) where {p,T,K} return BSplineSpace{p,T}(K(knotvector(P))) end +function BSplineSpace{p,T,K}(k::AbstractKnotVector) where {p,T,K} + return BSplineSpace{p,T}(K(k)) +end # Broadcast like a scalar Base.Broadcast.broadcastable(P::BSplineSpace) = Ref(P)