From 78dfc618ed9550f89f7cada667f6dd6ea8410254 Mon Sep 17 00:00:00 2001 From: Christoph Ruegg Date: Fri, 25 Nov 2016 15:05:42 +0100 Subject: [PATCH] LA: F# vector/matrix functions to accept all #seq instead of lists only --- src/FSharp/LinearAlgebra.Matrix.fs | 4 ++-- src/FSharp/LinearAlgebra.Vector.fs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/FSharp/LinearAlgebra.Matrix.fs b/src/FSharp/LinearAlgebra.Matrix.fs index 25f77710..822640db 100644 --- a/src/FSharp/LinearAlgebra.Matrix.fs +++ b/src/FSharp/LinearAlgebra.Matrix.fs @@ -657,8 +657,8 @@ module DiagonalMatrix = [] module MatrixExtensions = - /// Construct a dense matrix from a nested list of numbers. - let inline matrix (lst: list>) = DenseMatrix.ofRowList lst + /// Construct a dense matrix from a nested sequence of numbers. + let inline matrix (rowsSequences: #seq<#seq<'T>>) = DenseMatrix.ofRowSeq rowsSequences // A type extension for the generic matrix type that // adds the 'GetSlice' method to allow m.[r1 .. r2, c1 .. c2] syntax diff --git a/src/FSharp/LinearAlgebra.Vector.fs b/src/FSharp/LinearAlgebra.Vector.fs index f86f6e49..90951e00 100644 --- a/src/FSharp/LinearAlgebra.Vector.fs +++ b/src/FSharp/LinearAlgebra.Vector.fs @@ -328,8 +328,8 @@ module SparseVector = [] module VectorExtensions = - /// Construct a dense vector from a list of floating point numbers. - let inline vector (lst: list<'T>) = DenseVector.ofList lst + /// Construct a dense vector from a sequence of floating point numbers. + let inline vector (sequence: #seq<'T>) = DenseVector.ofSeq sequence // A type extension for the generic vector type that // adds the 'GetSlice' method to allow vec.[a .. b] syntax