Home

Awesome

<!-- PROJECT SHIELDS -->

Contributors Forks Stargazers Issues MIT License LinkedIn

<!-- PROJECT LOGO --> <br /> <p align="center"> <a href="https://github.com/lisp-stat/array-operations"> <img src="https://lisp-stat.dev/images/stats-image.svg" alt="Logo" width="80" height="80"> </a> <h3 align="center">Array Operations</h3> <p align="center"> A collection of functions and macros for manipulating Lisp-Stat data-frames and CL arrays <br /> <a href="https://lisp-stat.dev/docs/manuals/array-operations/"><strong>Explore the docs »</strong></a> <br /> <br /> <a href="https://github.com/lisp-stat/array-operations/issues">Report Bug</a> · <a href="https://github.com/lisp-stat/array-operations/issues">Request Feature</a> · <a href="https://lisp-stat.github.io/array-operations/">Reference Manual</a> </p> </p> <!-- TABLE OF CONTENTS --> <details open="open"> <summary><h2 style="display: inline-block">Table of Contents</h2></summary> <ol> <li> <a href="#about-the-project">About The Project</a> <ul> <li><a href="#built-with">Built With</a></li> </ul> </li> <li> <a href="#getting-started">Getting Started</a> <ul> <li><a href="#prerequisites">Prerequisites</a></li> <li><a href="#installation">Installation</a></li> </ul> </li> <li><a href="#usage">Usage</a></li> <li><a href="#roadmap">Roadmap</a></li> <li><a href="#resources">Resources</a></li> <li><a href="#contributing">Contributing</a></li> <li><a href="#license.md">License</a></li> <li><a href="#contact">Contact</a></li> </ol> </details> <!-- ABOUT THE PROJECT -->

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 -->

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 EXAMPLES -->

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 -->

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 -->

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 -->

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 -->

Contact

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

<!-- MARKDOWN LINKS & IMAGES --> <!-- https://www.markdownguide.org/basic-syntax/#reference-style-links -->