Skip to content

Lisp-Stat/array-operations

 
 

Repository files navigation

Contributors Forks Stargazers Issues MIT License LinkedIn


Logo

Array Operations

A collection of functions and macros for manipulating Lisp-Stat data-frames and CL arrays
Explore the docs »

Report Bug · Request Feature · Reference Manual

Table of Contents

  1. About The Project
  2. Getting Started
  3. Usage
  4. Roadmap
  5. Resources
  6. Contributing
  7. License
  8. Contact

About the Project

The array-operations system is a collection of functions and macros for manipulating Common Lisp arrays and performing numerical calculations with them.

Array-operations is a 'generic' way of operating on array like data structures. Several aops functions have been implemented for data-frame. For those that haven't, you can transform arrays to data frames using the df:matrix-df function, and a data-frame to an array using df:as-array. This make it convenient to work with the data sets using either system.

Built With

Getting Started

To get a local copy up and running follow these steps:

Prerequisites

An ANSI Common Lisp implementation. Developed and tested with SBCL.

Quicklisp Installation

(ql:quickload :array-operations)

Manual Installation

  1. Clone the repository
    cd ~/quicklisp/local-projects &&
    git clone https://github.com/Lisp-Stat/array-operations.git
  2. Reset the ASDF source-registry to find the new system (from the REPL)
    (asdf:clear-source-registry)
  3. Load the system
    (ql:quickload :array-operations)

Usage

Arrays can be created with numbers from a statistical distribution:

(rand '(2 2)) ; => #2A((0.62944734 0.2709539) (0.81158376 0.6700171))

in linear ranges:

(linspace 1 10 7) ; => #(1 5/2 4 11/2 7 17/2 10)

or generated using a function, optionally given index position

(generate #'identity '(2 3) :position) ; => #2A((0 1 2) (3 4 5))

For more examples, please refer to the manual.

Roadmap

See the open issues for a list of proposed features (and known issues).

Resources

This system is part of the Lisp-Stat project; that should be your first stop for information. Also see the resources and community page for more information.

Contributing

Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated. Please see CONTRIBUTING.md for details on the code of conduct, and the process for submitting pull requests.

License

The original code from Tamas Papp and Ben Dudson is licensed under the MIT license. Modifications by Symbolics are distributed under the MS-PL License. See LICENSE for more information.

Notes

Expect spurious warnings from SBCL related to 'deleting unreachable code' when running the tests. The tests it's warning about do run and we haven't had the time to debug SBCL's warnings. See issue #4.

Contact

Project Link: https://github.com/lisp-stat/array-operations