Giter VIP home page Giter VIP logo

numcl's Introduction

Numcl https://travis-ci.org/numcl/numcl.svg?branch=master

This is a Numpy clone in Common Lisp. At the moment the library is written in pure Common Lisp, focusing more on correctness and usefullness, not speed. Track the progress at https://github.com/numcl/numcl/projects/1 .

https://asciinema.org/a/245792.svg

Goals

  • Closely follow the numpy API, but still make it lispy.
    • Delegate the documentation effort to Numpy community.
  • Replace the Common Lisp array interface.
    • We do not deviate from the traditional symbols/idioms in Common Lisp unless necessary. Therefore we provide symbols that conflicts the Common Lisp symbol. Math functions become aliases to the original CL functions when the inputs are not arrays.
    • See ./DETAILS.org#packages .

Features/Contracts

  • APIs are provided as functions, not macros.
    • It is a design flaw otherwise.
    • This does not mean the API is functional — we use procedural code.
  • Still, zero overhead.
    • The APIs are simply the wrappers over simple functions and designed to be fully inlined.
    • Optimization will be done on the compiler side, not by macros.
  • Operations are type-correct.
    • They always return arrays of the most specific array-element-type. For example,
    • (zeros 5) returns a bit vector.
    • (asarray ‘(1 2 3)) returns an (unsigned-byte 2) vector.
    • See ./DETAILS.org#types .
  • NUMCL Arrays are CL arrays.
    • As this library aims to extend Common Lisp (not to replace part of it) in a compatible way, we do not introduce custom structures/classes for representing an array.
    • See ./DETAILS.org#representation .

Examples & documentation

./example.lisp contains a script that you can explore the functionarity already implemented in NUMCL.

See DETAILS.org for the types available in numcl, and object representation.

Dependencies

NUMCL depends on https://github.com/numcl/constantfold . This library is at least tested on implementation listed below:

  • SBCL 1.4.12 on X86-64 Linux 4.4.0-141-generic (author’s environment)
  • SBCL 1.5.1 on X86-64 Linux 4.4.0-141-generic (author’s environment)
  • CI tested on CCL, ECL.

Dependency graph:

./numcl.png

Author, License, Copyright

Masataro Asai ([email protected])

Licensed under LGPL v3.

Copyright (c) 2019 IBM Corporation

numcl's People

Contributors

guicho271828 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.