Quantcast
Channel: Math.NET Numerics - Math.NET
Viewing all articles
Browse latest Browse all 224

Single precision EnumerateIndexed type

$
0
0

@o1lo01ol1o wrote:

Hi, I'm just getting started with mathnet.numerics and I've run into an intellisense complaint when trying to filter the values of a single-point vector. Effectively d.EnumerateIndexed() looks to return a an f# float where I'm comparing it to a float32. I've opened MathNet.Numerics.LinearAlgebra.Single. Am I missing something?

The error is with respect to r in the Seq.filter function; r is a float32 and d is a DenseVector

let mutable s_idx:array = d.EnumerateIndexed() |> Seq.filter (fun (i,x) -> x <= r )
|> Seq.fold (fun acc (i:int, x) -> i::acc) []
|> List.toArray
|> Array.rev

thanks

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 224