From bc08b4942ec4c31c4182f91fb709d2838fbad854 Mon Sep 17 00:00:00 2001 From: Kiana Sheibani Date: Thu, 16 Mar 2023 09:17:14 -0400 Subject: [PATCH] Update README --- README.md | 10 ++++++---- src/Data/NumIdr/Interfaces.idr | 1 + src/Data/NumIdr/Matrix.idr | 3 ++- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index e378d29..4e6eb65 100644 --- a/README.md +++ b/README.md @@ -2,8 +2,7 @@ NumIdr is a linear algebra and data manipulation library for Idris 2. It features an efficient, type-safe array data structure, as well as utilities for working with -vector spaces and matrices. It borrows concepts heavily from Python's [NumPy](https://numpy.org/), -as well as Rust's [nalgebra](https://www.nalgebra.org/). +vector spaces and matrices. The name is pronounced like "num-idge". @@ -19,9 +18,12 @@ The name is pronounced like "num-idge". - Transform types for working with rotations, reflections, isometries, and other types of affine maps. -## Planned Features +## Inspiration -- An IO-based mutable array type, useful for writing more efficient code. +NumIdr is inspired by many different data science and linear algebra libraries, +including Python's [NumPy](https://numpy.org/), Rust's [nalgebra](https://www.nalgebra.org/), +and Haskell's [massiv](https://hackage.haskell.org/package/massiv). It aims to +combine the most useful features of each library. ## Documentation diff --git a/src/Data/NumIdr/Interfaces.idr b/src/Data/NumIdr/Interfaces.idr index 37c12e8..8e6cb78 100644 --- a/src/Data/NumIdr/Interfaces.idr +++ b/src/Data/NumIdr/Interfaces.idr @@ -92,6 +92,7 @@ public export interface MultMonoid a => MultGroup a where constructor MkMultGroup ||| Calculate the inverse of the matrix or transformation. + ||| ||| WARNING: This function will not check if an inverse exists for the given ||| input, and will happily divide by zero or return results containing NaN. ||| To avoid this, use `tryInverse` instead. diff --git a/src/Data/NumIdr/Matrix.idr b/src/Data/NumIdr/Matrix.idr index 1f5753f..0da3f27 100644 --- a/src/Data/NumIdr/Matrix.idr +++ b/src/Data/NumIdr/Matrix.idr @@ -6,6 +6,7 @@ import Data.Permutation import Data.NumIdr.Interfaces import public Data.NumIdr.Array import Data.NumIdr.Vector +import Data.NumIdr.LArray %default total @@ -20,7 +21,7 @@ Matrix m n = Array [m,n] ||| A synonym for a square matrix with dimensions of length `n`. public export Matrix' : Nat -> Type -> Type -Matrix' n = Matrix n n +Matrix' n = Array [n,n] --------------------------------------------------------------------------------