The xarray Reference Manual

This is the xarray Reference Manual, generated automatically by Declt version 4.0 beta 2 "William Riker" on Sun Dec 15 08:07:00 2024 GMT+0.

Table of Contents


1 Introduction


2 Systems

The main system appears first, followed by any subsystem dependency.


2.1 xarray

Author

Tamas K Papp

License

MIT

Dependencies
  • cl-utilities (system).
  • iterate (system).
  • metabang-bind (system).
  • anaphora (system).
Source

xarray.asd.

Child Components

3 Modules

Modules are listed depth-first from the system components tree.


3.1 xarray/package-init

Source

xarray.asd.

Parent Component

xarray (system).

Child Component

package.lisp (file).


3.2 xarray/basics

Dependency

package-init (module).

Source

xarray.asd.

Parent Component

xarray (system).

Child Components

3.3 xarray/functionality

Dependency

basics (module).

Source

xarray.asd.

Parent Component

xarray (system).

Child Components

4 Files

Files are sorted by type and then listed depth-first from the systems components trees.


4.1 Lisp


4.1.1 xarray/xarray.asd

Source

xarray.asd.

Parent Component

xarray (system).

ASDF Systems

xarray.

Packages

xarray-asd.


4.1.2 xarray/package-init/package.lisp

Source

xarray.asd.

Parent Component

package-init (module).

Packages

xarray.


4.1.3 xarray/basics/types.lisp

Source

xarray.asd.

Parent Component

basics (module).

Internals

fixnum-vector (type).


4.1.4 xarray/basics/utilities.lisp

Dependency

types.lisp (file).

Source

xarray.asd.

Parent Component

basics (module).

Public Interface
Internals

4.1.5 xarray/basics/conditions.lisp

Dependency

utilities.lisp (file).

Source

xarray.asd.

Parent Component

basics (module).

Public Interface
Internals

4.1.6 xarray/basics/interface.lisp

Dependency

conditions.lisp (file).

Source

xarray.asd.

Parent Component

basics (module).

Public Interface
Internals

xarray-like (class).


4.1.7 xarray/functionality/array.lisp

Source

xarray.asd.

Parent Component

functionality (module).

Public Interface

4.1.8 xarray/functionality/view.lisp

Dependency

array.lisp (file).

Source

xarray.asd.

Parent Component

functionality (module).

Public Interface
Internals

4.1.9 xarray/functionality/operations.lisp

Dependency

view.lisp (file).

Source

xarray.asd.

Parent Component

functionality (module).

Public Interface
  • x* (generic function).
  • x+ (generic function).
  • x- (generic function).
  • x/ (generic function).
  • x= (generic function).
  • xcollect (function).
  • xconcat (function).
  • xdot (generic function).
  • xmap (function).
  • xmax (generic function).
  • xmean (function).
  • xmin (generic function).
  • xop (function).
  • xorder (function).
  • xprod (generic function).
  • xsort (function).
  • xsum (generic function).
Internals

4.1.10 xarray/functionality/sequences.lisp

Dependency

operations.lisp (file).

Source

xarray.asd.

Parent Component

functionality (module).

Public Interface
Internals

4.1.11 xarray/functionality/atoms.lisp

Dependency

sequences.lisp (file).

Source

xarray.asd.

Parent Component

functionality (module).

Public Interface

5 Packages

Packages are listed by definition order.


5.1 xarray-asd

Source

xarray.asd.

Use List
  • asdf/interface.
  • common-lisp.

5.2 xarray

Source

package.lisp.

Use List
  • anaphora.
  • cl-utilities.
  • common-lisp.
  • iterate.
  • metabang.bind.
Public Interface
Internals

6 Definitions

Definitions are sorted by export status, category, package, and then by lexicographic order.


6.1 Public Interface


6.1.1 Ordinary functions

Function: carray (element-type dimensions &rest elements)

Return a (simple-array element-type dimensions) containing elements, coerced to element-type.

Package

xarray.

Source

array.lisp.

Function: carray* (dimensions &rest elements)

Return a (simple-array element-type dimensions) containing elements, coerced to element-type, where the elemen-type is obtained using numeric-type-classifier.

Package

xarray.

Source

array.lisp.

Function: cm-index (dimensions subscripts)

Calculate the column-major flat index from subscripts (list of fixnums) and dimensions (list of fixnums). Works in the corner case when dimensions and subscripts are both nil.

Package

xarray.

Source

utilities.lisp.

Function: cm-subscripts (dimensions i)

Return the column-major subscripts (list) for flat index
i (fixnum), using dimensions (list of fixnums). No error checking, for internal use only. Works in the corner case when dimension is nil.

Package

xarray.

Source

utilities.lisp.

Function: copy-as (class object &rest options)

Convert OBJECT to CLASS as a deep copy, with the enforcement of no shared structure.

Package

xarray.

Source

interface.lisp.

Function: cvector (element-type &rest elements)

Return a (simple-array element-type (*)) containing elements, coerced to element-type.

Package

xarray.

Source

array.lisp.

Function: cvector* (&rest elements)

Return a (simple-array element-type (*)) containing elements, coerced to element-type, where the elemen-type is obtained using numeric-type-classifier.

Package

xarray.

Source

array.lisp.

Function: drop (object)

Return a view with the unit dimensions dropped.

Package

xarray.

Source

view.lisp.

Function: int-seq (a &optional b)

Create integer sequence 0,...,a-1 or, if b is given, a,...,b (with a<=b).

Package

xarray.

Source

sequences.lisp.

Function: original-ancestor (view)

Find the original ancestor (ie the one that is not a view). Simply returns objects which are not views. Since views can be nested, this needs to follow the chain backwards.

Package

xarray.

Source

view.lisp.

Function: rm-index (dimensions subscripts)

Return a row-major flat index for given subscripts (coerced to a vector, list also accepted), using dimensions (also coerced to a vector, list also accepted). Checks for boundaries and rank.

Package

xarray.

Source

utilities.lisp.

Function: rm-subscripts (dimensions i)

Return i decomposed to a list of subscripts, taking
dimensions (which is coerced to a vector) as a row-major indexing scheme. No error checking is performed, meant for internal use.

Package

xarray.

Source

utilities.lisp.

Function: xcollect (n function &optional target-spec)

Collect the result of calling function n times into an array (type of target-spec, or determined using xsimilar). Indexing is (i ...), where i is from 0 to n-1. The rest of the indexes are determined from the first value.

Package

xarray.

Source

operations.lisp.

Function: xconcat (target-type &rest arguments)

Concatenate atoms and/or vectors into a vector.

Package

xarray.

Source

operations.lisp.

Function: xcreate-similar (target-spec object dimensions &optional more-options)

If TARGET-SPEC is T or (CONS T OPTIONS), use xsimilar to determine target spec using object (and also merge options), otherwise use target-spec directly to create an object. This function is meant for internal use, when mapping functions need to determine a target spec from one of the arguments.

Package

xarray.

Source

interface.lisp.

Function: xmap (target function &rest arguments)

Apply function to arguments elementwise, and save the result in target.

Package

xarray.

Source

operations.lisp.

Function: xmean (a)

Mean of the elements.

Package

xarray.

Source

operations.lisp.

Function: xop (result-spec function &rest vectors)

Generalized outer product of vectors, using function.

Package

xarray.

Source

operations.lisp.

Function: xorder (vector predicate &key key stable-p)

Return a vector of integers starting from 0, representing the permutation of elements in vector that would result if sorted according to predicate (which you can use in xslice, etc). Key is passed to sort. If stable-p, stable-sort is used.

Package

xarray.

Source

operations.lisp.

Function: xsort (vector predicate &key key stable-p)

Sort vector using predicate. Calls xorder and returns order as the second value.

Package

xarray.

Source

operations.lisp.


6.1.2 Generic functions

Generic Function: as* (class object copy-p options)

Return an object converted to a given class, with
other properties (eg element types for arrays) as specified by the optional keyword arguments. The result may share structure with object, unless COPY-P. Similarly to XCREATE, class can be (cons class options). When class is nil, XSIMILAR is called to obtain the result type.

Usage note: libraries should specialize this method, but the user interface is AS or COPY-AS.

Package

xarray.

Source

interface.lisp.

Methods
Method: as* ((class (eql vector)) object copy-p options)
Source

array.lisp.

Method: as* ((class (eql array)) object copy-p options)
Source

array.lisp.

Method: as* (class object copy-p options)
Method: as* ((class (eql t)) object copy-p options)
Method: as* ((class list) object copy-p options)
Generic Function: column-major-projection (object &rest dimensions)

Row major projection to an xrefable object. Total
size needs to match the product of dimensions. If dimensions is omitted, it is taken to be the xsize of the object.

Package

xarray.

Source

view.lisp.

Methods
Method: column-major-projection (object &rest dimensions)
Generic Function: flat (object)

Flat index for an object.
flat-xview

An xview where elements can be accessed by a "flat" index on [0,total size), but the actual mapping is implementation-dependent. Mainly used for elementwise access where the order of elements does not matter, especially elementwise reductions with commutative operations (eg sum, product, maximum, etc).

There are two special considerations for this xview: (1) it only has to implement reading elements, not setting them, (2) it has to implement ancestor-subscripts, which map the flat index to that of the ancestor.

NOTE: flat-xviews do NOT have to be compatible across classes! Eg for Lisp arrays a flat-xview could be row-major, while for some other object it could be column major, etc. Only use FLAT XVIEWs if you truly don’t care about the order.

Package

xarray.

Source

view.lisp.

Methods
Method: flat (object)
Generic Function: permutation (object &rest permutation)

Takes an xarray-able object and creates a View which is a permutation of indexes.

Package

xarray.

Source

view.lisp.

Methods
Method: permutation (object &rest permutation)
Generic Function: x* (a b &key element-type &allow-other-keys)

Elementwise
* of two arrays, or an array and a scalar.

Package

xarray.

Source

operations.lisp.

Methods
Method: x* (a b &key element-type)
Method: x* (a (b number) &key element-type)
Method: x* ((a number) b &key element-type)
Generic Function: x+ (a b &key element-type &allow-other-keys)

Elementwise
+ of two arrays, or an array and a scalar.

Package

xarray.

Source

operations.lisp.

Methods
Method: x+ (a b &key element-type)
Method: x+ (a (b number) &key element-type)
Method: x+ ((a number) b &key element-type)
Generic Function: x- (a b &key element-type &allow-other-keys)

Elementwise
- of two arrays, or an array and a scalar.

Package

xarray.

Source

operations.lisp.

Methods
Method: x- (a b &key element-type)
Method: x- (a (b number) &key element-type)
Method: x- ((a number) b &key element-type)
Generic Function: x/ (a b &key element-type &allow-other-keys)

Elementwise
/ of two arrays, or an array and a scalar.

Package

xarray.

Source

operations.lisp.

Methods
Method: x/ (a b &key element-type)
Method: x/ (a (b number) &key element-type)
Method: x/ ((a number) b &key element-type)
Generic Function: x= (a b &optional eps)

Return non-nil if A and B have the same dimensions,, and the sup|A-B| <= eps.

Package

xarray.

Source

operations.lisp.

Methods
Method: x= (a b &optional eps)
Generic Function: xcreate (class dimensions &optional options)

Return a new object of given type and dimensions,
with additional options. Dimensions can be a list, or a single number. xcreate can also be called as
(XCREATE (CONS CLASS OPTIONS) DIMENSIONS), in which case it will split the cons, merge OPTIONS and call XCREATE again.

Package

xarray.

Source

interface.lisp.

Methods
Method: xcreate ((class (eql array)) dimensions &optional options)
Source

array.lisp.

Method: xcreate ((class list) dimensions &optional options)
Generic Function: xdim (object dim)

Return the size of the dim-th dim. We use the
default unless there is some sensible reason to implement otherwise.

Package

xarray.

Source

interface.lisp.

Methods
Method: xdim ((object flat-xview) axis-number)
Source

view.lisp.

Method: xdim ((object column-major-projection-flat-xview) axis-number)
Source

view.lisp.

Method: xdim ((object column-major-projection-xview) axis-number)
Source

view.lisp.

Method: xdim ((object xslice-xview) axis-number)
Source

view.lisp.

Method: xdim ((object permutation-xview) axis-number)
Source

view.lisp.

Method: xdim ((object array) axis-number)
Source

array.lisp.

Method: xdim ((object xarray-like) (dim integer))
Generic Function: xdims (object)

Return a list of dimensions of object. The list
does not share structure with anything, so it can be freely modified.

Package

xarray.

Source

interface.lisp.

Methods
Method: xdims (object)
Source

atoms.lisp.

Method: xdims ((seq seq))
Source

sequences.lisp.

Method: xdims ((object flat-xview))
Source

view.lisp.

Method: xdims ((object column-major-projection-flat-xview))
Source

view.lisp.

Method: xdims ((object column-major-projection-xview))
Source

view.lisp.

Method: xdims ((object xslice-xview))
Source

view.lisp.

Method: xdims ((object permutation-xview))
Source

view.lisp.

Method: xdims ((object array))
Source

array.lisp.

Method: xdims ((object xarray-like))
Generic Function: xdot (a b)

Dot product of two vectors.

Package

xarray.

Source

operations.lisp.

Methods
Method: xdot (a b)
Generic Function: xelttype (object &key list-of-rows list-of-columns)

Return the type of elements. If no restriction is
imposed, return T. By default, T is expected, numerically-oriented matrices being the exception and hence different.

If there is :list-of-rows or :list-of-columns specified, then return a list with the types for the rows or columns, respectively. These would be a repeated list of the same type in the case of a numerical single-typed matrix.

We do not throw an error for this not being specified - it is only specified FOR restrictions, not when there are no restrictions.

Package

xarray.

Source

interface.lisp.

Methods
Method: xelttype (object &key list-of-rows list-of-columns)
Source

atoms.lisp.

Method: xelttype ((seq int-seq) &key list-of-rows list-of-columns)
Source

sequences.lisp.

Method: xelttype ((object xview) &key list-of-rows list-of-columns)
Source

view.lisp.

Method: xelttype ((object array) &key list-of-rows list-of-columns)
Source

array.lisp.

Method: xelttype ((object xarray-like) &key list-of-rows list-of-columns)
Generic Function: xmax (a)

Maximum of the elements.

Package

xarray.

Source

operations.lisp.

Methods
Method: xmax (a)
Method: xmax ((a array))
Generic Function: xmin (a)

Minimum of the elements.

Package

xarray.

Source

operations.lisp.

Methods
Method: xmin (a)
Method: xmin ((a array))
Generic Function: xprod (a)

Product of the elements.

Package

xarray.

Source

operations.lisp.

Methods
Method: xprod (a)
Method: xprod ((a array))
Generic Function: xrank (object)

Returns the number of dimensions of object.

Package

xarray.

Source

interface.lisp.

Methods
Method: xrank ((object flat-xview))
Source

view.lisp.

Method: xrank ((object column-major-projection-flat-xview))
Source

view.lisp.

Method: xrank ((object column-major-projection-xview))
Source

view.lisp.

Method: xrank ((object xslice-xview))
Source

view.lisp.

Method: xrank ((object permutation-xview))
Source

view.lisp.

Method: xrank ((object array))
Source

array.lisp.

Method: xrank ((object xarray-like))
Generic Function: xref (object &rest subscripts)

Accesses the element of the object specified by subscripts.

Package

xarray.

Source

interface.lisp.

Methods
Method: xref (object &rest subscripts)
Source

atoms.lisp.

Method: xref ((seq int-seq) &rest subscripts)
Source

sequences.lisp.

Method: xref ((object flat-xview) &rest subscripts)
Source

view.lisp.

Method: xref ((object column-major-projection-flat-xview) &rest subscripts)
Source

view.lisp.

Method: xref ((object column-major-projection-xview) &rest subscripts)
Source

view.lisp.

Method: xref ((object xslice-xview) &rest subscripts)
Source

view.lisp.

Method: xref ((object permutation-xview) &rest subscripts)
Source

view.lisp.

Method: xref ((object array) &rest subscripts)
Source

array.lisp.

Method: xref ((object xarray-like) &rest subscripts)
Generic Function: (setf xref) (object &rest subscripts)

Accesses the element of the object specified by subscripts.

Package

xarray.

Source

interface.lisp.

Methods
Method: (setf xref) ((object column-major-projection-flat-xview) &rest subscripts)
Source

view.lisp.

Method: (setf xref) ((object column-major-projection-xview) &rest subscripts)
Source

view.lisp.

Method: (setf xref) ((object xslice-xview) &rest subscripts)
Source

view.lisp.

Method: (setf xref) ((object permutation-xview) &rest subscripts)
Source

view.lisp.

Method: (setf xref) ((object array) &rest subscripts)
Source

array.lisp.

Generic Function: xsetf (destination source &key map-function)

Copy the elements of source to destination.
Map-function, if given, will be used to map the elements, the default is conversion (if necessary) with coerce.

Package

xarray.

Source

interface.lisp.

Methods
Method: xsetf (destination source &key map-function)
Generic Function: xsimilar (rank object)

Return (CONS CLASS OPTIONS) for creating a similar
object with new rank. If rank is T, use rank of object. NOTE: for methods, make sure you specialize rank to fixnum if you are not handling T.

This method needs to be clarified a bit – it is more about providing meta data for rebuilding, not about determining some notion of equalness.

Package

xarray.

Source

interface.lisp.

Methods
Method: xsimilar (rank object)
Source

atoms.lisp.

Method: xsimilar (rank (object xview))
Source

view.lisp.

Method: xsimilar (rank (object array))
Source

array.lisp.

Method: xsimilar ((rank (eql t)) object)
Method: xsimilar (rank (object xarray-like))
Generic Function: xsize (object)

Return the total number of elements in object.

Package

xarray.

Source

interface.lisp.

Methods
Reader Method: xsize ((seq seq))

length of sequence

Source

sequences.lisp.

Target Slot

xsize.

Reader Method: xsize ((flat-xview flat-xview))

total size

Source

view.lisp.

Target Slot

xsize.

Reader Method: xsize ((column-major-projection-flat-xview column-major-projection-flat-xview))

total size

Source

view.lisp.

Target Slot

xsize.

Method: xsize ((object column-major-projection-xview))
Source

view.lisp.

Method: xsize ((object array))
Source

array.lisp.

Method: xsize ((object xarray-like))
Generic Writer: (setf xsize) (object)
Package

xarray.

Methods
Writer Method: (setf xsize) ((seq seq))

length of sequence

Source

sequences.lisp.

Target Slot

xsize.

Generic Function: xslice (object &rest index-specifications)

Slice of an object.

Package

xarray.

Source

view.lisp.

Methods
Method: xslice (object &rest index-specifications)

Implementation note: we cache dimensions.

Generic Function: (setf xslice) (object &rest index-specifications)

setting a slice of an object.

Package

xarray.

Source

view.lisp.

Generic Function: xsum (a)

Sum of the elements.

Package

xarray.

Source

operations.lisp.

Methods
Method: xsum (a)
Method: xsum ((a array))

6.1.3 Standalone methods

Method: initialize-instance :after ((object flat-xview) &key)
Source

view.lisp.

Method: initialize-instance :after ((object permutation-xview) &key)
Source

view.lisp.

Method: print-object ((object int-seq) stream)
Source

sequences.lisp.

Method: print-object ((object xview) stream)
Source

view.lisp.


6.1.4 Conditions

Condition: xdim-invalid-axis-number
Package

xarray.

Source

conditions.lisp.

Direct superclasses

error.

Condition: xref-incompatible-type
Package

xarray.

Source

conditions.lisp.

Direct superclasses

error.

Direct methods

subscripts.

Direct slots
Slot: subscripts
Initargs

:subscripts

Readers

subscripts.

Writers

This slot is read-only.

Condition: xref-setting-readonly
Package

xarray.

Source

conditions.lisp.

Direct superclasses

error.

Direct methods

subscripts.

Direct slots
Slot: subscripts
Initargs

:subscripts

Readers

subscripts.

Writers

This slot is read-only.

Condition: xref-subscript-out-of-bounds
Package

xarray.

Source

conditions.lisp.

Direct superclasses

error.

Direct methods
Direct slots
Slot: subscripts
Initargs

:subscripts

Readers

subscripts.

Writers

This slot is read-only.

Slot: dimensions
Initargs

:dimensions

Readers

dimensions.

Writers

This slot is read-only.

Condition: xref-wrong-number-of-subscripts
Package

xarray.

Source

conditions.lisp.

Direct superclasses

error.

Direct methods
Direct slots
Slot: subscripts
Initargs

:subscripts

Readers

subscripts.

Writers

This slot is read-only.

Slot: rank
Initargs

:rank

Readers

rank.

Writers

This slot is read-only.


6.1.5 Classes

Class: flat-xview
Package

xarray.

Source

view.lisp.

Direct superclasses

xview.

Direct methods
Direct slots
Slot: xsize

total size

Type

fixnum

Readers

xsize.

Writers

This slot is read-only.

Slot: ancestor-dimensions

dimensions of ancestor

Type

list

Readers

ancestor-dimensions.

Writers

This slot is read-only.

Class: int-seq

A sequence of integers.

Package

xarray.

Source

sequences.lisp.

Direct superclasses

seq.

Direct methods
Direct slots
Slot: start

first integer

Type

integer

Initform

0

Initargs

:start

Readers

start.

Writers

This slot is read-only.

Class: permutation-xview
Package

xarray.

Source

view.lisp.

Direct superclasses

xview.

Direct methods
Direct slots
Slot: permutation

permutation

Type

xarray::fixnum-vector

Initargs

:permutation

Slot: dimensions

dimensions

Type

xarray::fixnum-vector

Initargs

:dimensions

Readers

dimensions.

Writers

This slot is read-only.

Class: xslice-xview
Package

xarray.

Source

view.lisp.

Direct superclasses

xview.

Direct methods
Direct slots
Slot: index-specifications

vector of index specifications

Type

xarray::fixnum-vector

Initargs

:index-specifications

Readers

index-specifications.

Writers

This slot is read-only.

Slot: dimensions

dimensions, cached

Type

xarray::fixnum-vector

Initargs

:dimensions

Readers

dimensions.

Writers

This slot is read-only.

Class: xview
Package

xarray.

Source

view.lisp.

Direct subclasses
Direct methods
Direct slots
Slot: ancestor

the view of an underlying object that is accessible with xref

Initargs

:ancestor

Readers

ancestor.

Writers

This slot is read-only.


6.2 Internals


6.2.1 Macros

Macro: define-elementwise-operation (operation &optional documentation name)

Defines an elementwise operation, with some default methods that return arrays.

Package

xarray.

Source

operations.lisp.

Macro: define-flat-reduction (name modify-macro docstring &body body)

Define a generic function named NAME which reduces its argument elementwise. body is spliced into the iterate loop, and can be used for early returns, etc. See code for variable names.

Package

xarray.

Source

operations.lisp.

Macro: maxf (place &rest values)

Replace with largest of the place and the given values.

Package

xarray.

Source

utilities.lisp.

Macro: minf (place &rest values)

Replace with smallest of the place and the given values.

Package

xarray.

Source

utilities.lisp.

Macro: multf (place &rest values)

Multiply (& set) the first argument by the rest.

Package

xarray.

Source

utilities.lisp.


6.2.2 Ordinary functions

Function: convert-slice-subscripts (index-specifications subscripts)

Convert subscripts using index-specifications.

Package

xarray.

Source

view.lisp.

Function: delete-duplicate-keywords (pairs)

Delete conses with duplicate keywords. Destructive.

Package

xarray.

Source

utilities.lisp.

Function: element-conversion-function (source destination)

Return a conversion function that is identity if (subtypep source destination), or constructed with coerce otherwise.

Package

xarray.

Source

utilities.lisp.

Function: fill-array-with-list (array list)

Fills array with elements from list, coerced to the appropriate type. No error checking, meant to be used internally. Return array.

Package

xarray.

Source

utilities.lisp.

Function: flat->pairs (list)

Transform a flat list of keyword-option pairs to a list of conses.

Package

xarray.

Source

utilities.lisp.

Function: index-specification-dimension (index-specification)

Return dimension of parsed index-specification. Internal function, no error checking. Return nil for dropped dimensions.

Package

xarray.

Source

view.lisp.

Function: invert-permutation (permutation)

Return the inverse of a valid permutation vector (validity is not checked, results are not defined for invalid permutations).

Package

xarray.

Source

utilities.lisp.

Function: make-symbol* (&rest args)

Build a symbol by concatenating each element of ARGS, and intern it in the current package. Elements can be strings or symbols.

Package

xarray.

Source

utilities.lisp.

Function: merge-options (&rest options-specs)

Merge options specifications. Duplicate pairs are removed, options that come later (both within and between arguments) are used.

Package

xarray.

Source

utilities.lisp.

Function: mklist (obj)
Package

xarray.

Source

utilities.lisp.

Function: numeric-type-classifier (list)

Numeric type classifier, finds the smallest subtype that can accomodate the elements of list, in the ordering fixnum < integer < float < complex < t. Rational, float (any kind) are classified as double-float, and complex numbers as (complex double-float). Meant to be used by simple array-constructing functions. Upgraded-array-element-type is called on end result.

Package

xarray.

Source

utilities.lisp.

Function: pairs->flat (pairs)

Flatten a list of conses.

Package

xarray.

Source

utilities.lisp.

Function: parse-index-specification (index-specification dimension)

Parse a index specification, returning either

- an integer i, with the dimension dropped,

- a pair (start . length), where start is the starting index, and
length is the number of valid indexes. If dimension is negative, indexing is decreasing from start. This is used for contiguous indexes

- a vector of indexes, for non-contiguous indexing.

All resulting indexes are valid, ie they are integers in
[0,dimension).

Range specifications:

Negative integers are interpreted as counted backwards from the right edge of the domain, ie i < 0 denotes element dimension-i. The l

Valid index-specification specifications (a and b are integers):

a index a, dimension dropped
(list a) index a, dimension not dropped
(list a b) range between a and b, inclusive. If b < a, reversed. :all all valid indexes, increasing order
:rev all valid indexes, decreasing order
(vector i1 ... in) vector of indexes, must be a set (no repetition).

Package

xarray.

Source

view.lisp.

Function: permute-sequence (permutation sequence)

Return permuted sequence as a list. Works even if indexes repeat.

Package

xarray.

Source

utilities.lisp.

Function: valid-integer-subset-p (vector dimension)

Return non-nil (t) iff vector is a valid subset (ie with no repetition) of integers 0,1,...,(1- dimension).

Package

xarray.

Source

utilities.lisp.

Function: valid-permutation-p (vector &optional dimension)

Return non-nil (t) iff vector is a valid permutation of integers 0,1,...,(1- dimension).

Package

xarray.

Source

utilities.lisp.

Function: vector-within-dimension-p (vector dimension)

Return non-nil iff all elements in vector are in [0,dimension).

Package

xarray.

Source

utilities.lisp.

Function: within-dimension-p (subscript dimension)

Check if 0 <= subscript < dimension.

Package

xarray.

Source

utilities.lisp.

Function: xdims= (a b)

Return non-nil iff the dimensions of A and B are the same.

Package

xarray.

Source

operations.lisp.


6.2.3 Generic functions

Generic Reader: ancestor (object)
Package

xarray.

Methods
Reader Method: ancestor ((xview xview))

the view of an underlying object that is accessible with xref

Source

view.lisp.

Target Slot

ancestor.

Generic Reader: ancestor-dimensions (object)
Package

xarray.

Methods
Reader Method: ancestor-dimensions ((flat-xview flat-xview))

dimensions of ancestor

Source

view.lisp.

Target Slot

ancestor-dimensions.

Reader Method: ancestor-dimensions ((column-major-projection-flat-xview column-major-projection-flat-xview))

dimensions of ancestor

Source

view.lisp.

Target Slot

ancestor-dimensions.

Reader Method: ancestor-dimensions ((column-major-projection-xview column-major-projection-xview))

dimensions of ancestor

Source

view.lisp.

Target Slot

ancestor-dimensions.

Generic Function: ancestor-subscripts (object index)

Map the flat index the subscripts of the ancestor.

Package

xarray.

Source

view.lisp.

Methods
Method: ancestor-subscripts ((object flat-xview) index)
Generic Reader: dimensions (condition)
Package

xarray.

Methods
Reader Method: dimensions ((column-major-projection-xview column-major-projection-xview))

dimensions

Source

view.lisp.

Target Slot

dimensions.

Reader Method: dimensions ((xslice-xview xslice-xview))

dimensions, cached

Source

view.lisp.

Target Slot

dimensions.

Reader Method: dimensions ((permutation-xview permutation-xview))

dimensions

Source

view.lisp.

Target Slot

dimensions.

Reader Method: dimensions ((condition xref-subscript-out-of-bounds))
Source

conditions.lisp.

Target Slot

dimensions.

Generic Reader: index-specifications (object)
Package

xarray.

Methods
Reader Method: index-specifications ((xslice-xview xslice-xview))

vector of index specifications

Source

view.lisp.

Target Slot

index-specifications.

Generic Reader: rank (condition)
Package

xarray.

Methods
Reader Method: rank ((condition xref-wrong-number-of-subscripts))
Source

conditions.lisp.

Target Slot

rank.

Generic Reader: start (object)
Package

xarray.

Methods
Reader Method: start ((int-seq int-seq))

first integer

Source

sequences.lisp.

Target Slot

start.

Generic Reader: subscripts (condition)
Package

xarray.

Methods
Reader Method: subscripts ((condition xref-incompatible-type))
Source

conditions.lisp.

Target Slot

subscripts.

Reader Method: subscripts ((condition xref-setting-readonly))
Source

conditions.lisp.

Target Slot

subscripts.

Reader Method: subscripts ((condition xref-wrong-number-of-subscripts))
Source

conditions.lisp.

Target Slot

subscripts.

Reader Method: subscripts ((condition xref-subscript-out-of-bounds))
Source

conditions.lisp.

Target Slot

subscripts.

Generic Function: transpose (object)

Tranposed view.

Package

xarray.

Source

view.lisp.

Methods
Method: transpose (object)

6.2.4 Classes

Class: column-major-projection-flat-xview
Package

xarray.

Source

view.lisp.

Direct superclasses

xview.

Direct methods
Direct slots
Slot: xsize

total size

Type

fixnum

Initargs

:xsize

Readers

xsize.

Writers

This slot is read-only.

Slot: ancestor-dimensions

dimensions of ancestor

Type

list

Initargs

:ancestor-dimensions

Readers

ancestor-dimensions.

Writers

This slot is read-only.

Class: column-major-projection-xview
Package

xarray.

Source

view.lisp.

Direct superclasses

xview.

Direct methods
Direct slots
Slot: dimensions

dimensions

Type

list

Initargs

:dimensions

Readers

dimensions.

Writers

This slot is read-only.

Slot: ancestor-dimensions

dimensions of ancestor

Type

list

Initargs

:ancestor-dimensions

Readers

ancestor-dimensions.

Writers

This slot is read-only.

Class: seq
Package

xarray.

Source

sequences.lisp.

Direct subclasses

int-seq.

Direct methods
Direct slots
Slot: xsize

length of sequence

Initargs

:xsize

Readers

xsize.

Writers

(setf xsize).

Class: xarray-like

mixin virtual superclass to indicate support for
dispatch and generics. There should be no objects instantiated with this class.

Package

xarray.

Source

interface.lisp.

Direct methods

6.2.5 Types

Type: fixnum-vector ()

Simple array of one dimension, containing fixnums.

Package

xarray.

Source

types.lisp.


Appendix A Indexes


A.1 Concepts


A.2 Functions

Jump to:   (  
A   C   D   E   F   G   I   M   N   O   P   R   S   T   V   W   X  
Index Entry  Section

(
(setf xref): Public generic functions
(setf xref): Public generic functions
(setf xref): Public generic functions
(setf xref): Public generic functions
(setf xref): Public generic functions
(setf xref): Public generic functions
(setf xsize): Public generic functions
(setf xsize): Public generic functions
(setf xslice): Public generic functions

A
ancestor: Private generic functions
ancestor: Private generic functions
ancestor-dimensions: Private generic functions
ancestor-dimensions: Private generic functions
ancestor-dimensions: Private generic functions
ancestor-dimensions: Private generic functions
ancestor-subscripts: Private generic functions
ancestor-subscripts: Private generic functions
as*: Public generic functions
as*: Public generic functions
as*: Public generic functions
as*: Public generic functions
as*: Public generic functions
as*: Public generic functions

C
carray: Public ordinary functions
carray*: Public ordinary functions
cm-index: Public ordinary functions
cm-subscripts: Public ordinary functions
column-major-projection: Public generic functions
column-major-projection: Public generic functions
convert-slice-subscripts: Private ordinary functions
copy-as: Public ordinary functions
cvector: Public ordinary functions
cvector*: Public ordinary functions

D
define-elementwise-operation: Private macros
define-flat-reduction: Private macros
delete-duplicate-keywords: Private ordinary functions
dimensions: Private generic functions
dimensions: Private generic functions
dimensions: Private generic functions
dimensions: Private generic functions
dimensions: Private generic functions
drop: Public ordinary functions

E
element-conversion-function: Private ordinary functions

F
fill-array-with-list: Private ordinary functions
flat: Public generic functions
flat: Public generic functions
flat->pairs: Private ordinary functions
Function, carray: Public ordinary functions
Function, carray*: Public ordinary functions
Function, cm-index: Public ordinary functions
Function, cm-subscripts: Public ordinary functions
Function, convert-slice-subscripts: Private ordinary functions
Function, copy-as: Public ordinary functions
Function, cvector: Public ordinary functions
Function, cvector*: Public ordinary functions
Function, delete-duplicate-keywords: Private ordinary functions
Function, drop: Public ordinary functions
Function, element-conversion-function: Private ordinary functions
Function, fill-array-with-list: Private ordinary functions
Function, flat->pairs: Private ordinary functions
Function, index-specification-dimension: Private ordinary functions
Function, int-seq: Public ordinary functions
Function, invert-permutation: Private ordinary functions
Function, make-symbol*: Private ordinary functions
Function, merge-options: Private ordinary functions
Function, mklist: Private ordinary functions
Function, numeric-type-classifier: Private ordinary functions
Function, original-ancestor: Public ordinary functions
Function, pairs->flat: Private ordinary functions
Function, parse-index-specification: Private ordinary functions
Function, permute-sequence: Private ordinary functions
Function, rm-index: Public ordinary functions
Function, rm-subscripts: Public ordinary functions
Function, valid-integer-subset-p: Private ordinary functions
Function, valid-permutation-p: Private ordinary functions
Function, vector-within-dimension-p: Private ordinary functions
Function, within-dimension-p: Private ordinary functions
Function, xcollect: Public ordinary functions
Function, xconcat: Public ordinary functions
Function, xcreate-similar: Public ordinary functions
Function, xdims=: Private ordinary functions
Function, xmap: Public ordinary functions
Function, xmean: Public ordinary functions
Function, xop: Public ordinary functions
Function, xorder: Public ordinary functions
Function, xsort: Public ordinary functions

G
Generic Function, (setf xref): Public generic functions
Generic Function, (setf xsize): Public generic functions
Generic Function, (setf xslice): Public generic functions
Generic Function, ancestor: Private generic functions
Generic Function, ancestor-dimensions: Private generic functions
Generic Function, ancestor-subscripts: Private generic functions
Generic Function, as*: Public generic functions
Generic Function, column-major-projection: Public generic functions
Generic Function, dimensions: Private generic functions
Generic Function, flat: Public generic functions
Generic Function, index-specifications: Private generic functions
Generic Function, permutation: Public generic functions
Generic Function, rank: Private generic functions
Generic Function, start: Private generic functions
Generic Function, subscripts: Private generic functions
Generic Function, transpose: Private generic functions
Generic Function, x*: Public generic functions
Generic Function, x+: Public generic functions
Generic Function, x-: Public generic functions
Generic Function, x/: Public generic functions
Generic Function, x=: Public generic functions
Generic Function, xcreate: Public generic functions
Generic Function, xdim: Public generic functions
Generic Function, xdims: Public generic functions
Generic Function, xdot: Public generic functions
Generic Function, xelttype: Public generic functions
Generic Function, xmax: Public generic functions
Generic Function, xmin: Public generic functions
Generic Function, xprod: Public generic functions
Generic Function, xrank: Public generic functions
Generic Function, xref: Public generic functions
Generic Function, xsetf: Public generic functions
Generic Function, xsimilar: Public generic functions
Generic Function, xsize: Public generic functions
Generic Function, xslice: Public generic functions
Generic Function, xsum: Public generic functions

I
index-specification-dimension: Private ordinary functions
index-specifications: Private generic functions
index-specifications: Private generic functions
initialize-instance: Public standalone methods
initialize-instance: Public standalone methods
int-seq: Public ordinary functions
invert-permutation: Private ordinary functions

M
Macro, define-elementwise-operation: Private macros
Macro, define-flat-reduction: Private macros
Macro, maxf: Private macros
Macro, minf: Private macros
Macro, multf: Private macros
make-symbol*: Private ordinary functions
maxf: Private macros
merge-options: Private ordinary functions
Method, (setf xref): Public generic functions
Method, (setf xref): Public generic functions
Method, (setf xref): Public generic functions
Method, (setf xref): Public generic functions
Method, (setf xref): Public generic functions
Method, (setf xsize): Public generic functions
Method, ancestor: Private generic functions
Method, ancestor-dimensions: Private generic functions
Method, ancestor-dimensions: Private generic functions
Method, ancestor-dimensions: Private generic functions
Method, ancestor-subscripts: Private generic functions
Method, as*: Public generic functions
Method, as*: Public generic functions
Method, as*: Public generic functions
Method, as*: Public generic functions
Method, as*: Public generic functions
Method, column-major-projection: Public generic functions
Method, dimensions: Private generic functions
Method, dimensions: Private generic functions
Method, dimensions: Private generic functions
Method, dimensions: Private generic functions
Method, flat: Public generic functions
Method, index-specifications: Private generic functions
Method, initialize-instance: Public standalone methods
Method, initialize-instance: Public standalone methods
Method, permutation: Public generic functions
Method, print-object: Public standalone methods
Method, print-object: Public standalone methods
Method, rank: Private generic functions
Method, start: Private generic functions
Method, subscripts: Private generic functions
Method, subscripts: Private generic functions
Method, subscripts: Private generic functions
Method, subscripts: Private generic functions
Method, transpose: Private generic functions
Method, x*: Public generic functions
Method, x*: Public generic functions
Method, x*: Public generic functions
Method, x+: Public generic functions
Method, x+: Public generic functions
Method, x+: Public generic functions
Method, x-: Public generic functions
Method, x-: Public generic functions
Method, x-: Public generic functions
Method, x/: Public generic functions
Method, x/: Public generic functions
Method, x/: Public generic functions
Method, x=: Public generic functions
Method, xcreate: Public generic functions
Method, xcreate: Public generic functions
Method, xdim: Public generic functions
Method, xdim: Public generic functions
Method, xdim: Public generic functions
Method, xdim: Public generic functions
Method, xdim: Public generic functions
Method, xdim: Public generic functions
Method, xdim: Public generic functions
Method, xdims: Public generic functions
Method, xdims: Public generic functions
Method, xdims: Public generic functions
Method, xdims: Public generic functions
Method, xdims: Public generic functions
Method, xdims: Public generic functions
Method, xdims: Public generic functions
Method, xdims: Public generic functions
Method, xdims: Public generic functions
Method, xdot: Public generic functions
Method, xelttype: Public generic functions
Method, xelttype: Public generic functions
Method, xelttype: Public generic functions
Method, xelttype: Public generic functions
Method, xelttype: Public generic functions
Method, xmax: Public generic functions
Method, xmax: Public generic functions
Method, xmin: Public generic functions
Method, xmin: Public generic functions
Method, xprod: Public generic functions
Method, xprod: Public generic functions
Method, xrank: Public generic functions
Method, xrank: Public generic functions
Method, xrank: Public generic functions
Method, xrank: Public generic functions
Method, xrank: Public generic functions
Method, xrank: Public generic functions
Method, xrank: Public generic functions
Method, xref: Public generic functions
Method, xref: Public generic functions
Method, xref: Public generic functions
Method, xref: Public generic functions
Method, xref: Public generic functions
Method, xref: Public generic functions
Method, xref: Public generic functions
Method, xref: Public generic functions
Method, xref: Public generic functions
Method, xsetf: Public generic functions
Method, xsimilar: Public generic functions
Method, xsimilar: Public generic functions
Method, xsimilar: Public generic functions
Method, xsimilar: Public generic functions
Method, xsimilar: Public generic functions
Method, xsize: Public generic functions
Method, xsize: Public generic functions
Method, xsize: Public generic functions
Method, xsize: Public generic functions
Method, xsize: Public generic functions
Method, xsize: Public generic functions
Method, xslice: Public generic functions
Method, xsum: Public generic functions
Method, xsum: Public generic functions
minf: Private macros
mklist: Private ordinary functions
multf: Private macros

N
numeric-type-classifier: Private ordinary functions

O
original-ancestor: Public ordinary functions

P
pairs->flat: Private ordinary functions
parse-index-specification: Private ordinary functions
permutation: Public generic functions
permutation: Public generic functions
permute-sequence: Private ordinary functions
print-object: Public standalone methods
print-object: Public standalone methods

R
rank: Private generic functions
rank: Private generic functions
rm-index: Public ordinary functions
rm-subscripts: Public ordinary functions

S
start: Private generic functions
start: Private generic functions
subscripts: Private generic functions
subscripts: Private generic functions
subscripts: Private generic functions
subscripts: Private generic functions
subscripts: Private generic functions

T
transpose: Private generic functions
transpose: Private generic functions

V
valid-integer-subset-p: Private ordinary functions
valid-permutation-p: Private ordinary functions
vector-within-dimension-p: Private ordinary functions

W
within-dimension-p: Private ordinary functions

X
x*: Public generic functions
x*: Public generic functions
x*: Public generic functions
x*: Public generic functions
x+: Public generic functions
x+: Public generic functions
x+: Public generic functions
x+: Public generic functions
x-: Public generic functions
x-: Public generic functions
x-: Public generic functions
x-: Public generic functions
x/: Public generic functions
x/: Public generic functions
x/: Public generic functions
x/: Public generic functions
x=: Public generic functions
x=: Public generic functions
xcollect: Public ordinary functions
xconcat: Public ordinary functions
xcreate: Public generic functions
xcreate: Public generic functions
xcreate: Public generic functions
xcreate-similar: Public ordinary functions
xdim: Public generic functions
xdim: Public generic functions
xdim: Public generic functions
xdim: Public generic functions
xdim: Public generic functions
xdim: Public generic functions
xdim: Public generic functions
xdim: Public generic functions
xdims: Public generic functions
xdims: Public generic functions
xdims: Public generic functions
xdims: Public generic functions
xdims: Public generic functions
xdims: Public generic functions
xdims: Public generic functions
xdims: Public generic functions
xdims: Public generic functions
xdims: Public generic functions
xdims=: Private ordinary functions
xdot: Public generic functions
xdot: Public generic functions
xelttype: Public generic functions
xelttype: Public generic functions
xelttype: Public generic functions
xelttype: Public generic functions
xelttype: Public generic functions
xelttype: Public generic functions
xmap: Public ordinary functions
xmax: Public generic functions
xmax: Public generic functions
xmax: Public generic functions
xmean: Public ordinary functions
xmin: Public generic functions
xmin: Public generic functions
xmin: Public generic functions
xop: Public ordinary functions
xorder: Public ordinary functions
xprod: Public generic functions
xprod: Public generic functions
xprod: Public generic functions
xrank: Public generic functions
xrank: Public generic functions
xrank: Public generic functions
xrank: Public generic functions
xrank: Public generic functions
xrank: Public generic functions
xrank: Public generic functions
xrank: Public generic functions
xref: Public generic functions
xref: Public generic functions
xref: Public generic functions
xref: Public generic functions
xref: Public generic functions
xref: Public generic functions
xref: Public generic functions
xref: Public generic functions
xref: Public generic functions
xref: Public generic functions
xsetf: Public generic functions
xsetf: Public generic functions
xsimilar: Public generic functions
xsimilar: Public generic functions
xsimilar: Public generic functions
xsimilar: Public generic functions
xsimilar: Public generic functions
xsimilar: Public generic functions
xsize: Public generic functions
xsize: Public generic functions
xsize: Public generic functions
xsize: Public generic functions
xsize: Public generic functions
xsize: Public generic functions
xsize: Public generic functions
xslice: Public generic functions
xslice: Public generic functions
xsort: Public ordinary functions
xsum: Public generic functions
xsum: Public generic functions
xsum: Public generic functions


A.4 Data types

Jump to:   A   B   C   F   I   M   O   P   S   T   U   V   X  
Index Entry  Section

A
array.lisp: The xarray/functionality/array․lisp file
atoms.lisp: The xarray/functionality/atoms․lisp file

B
basics: The xarray/basics module

C
Class, column-major-projection-flat-xview: Private classes
Class, column-major-projection-xview: Private classes
Class, flat-xview: Public classes
Class, int-seq: Public classes
Class, permutation-xview: Public classes
Class, seq: Private classes
Class, xarray-like: Private classes
Class, xslice-xview: Public classes
Class, xview: Public classes
column-major-projection-flat-xview: Private classes
column-major-projection-xview: Private classes
Condition, xdim-invalid-axis-number: Public conditions
Condition, xref-incompatible-type: Public conditions
Condition, xref-setting-readonly: Public conditions
Condition, xref-subscript-out-of-bounds: Public conditions
Condition, xref-wrong-number-of-subscripts: Public conditions
conditions.lisp: The xarray/basics/conditions․lisp file

F
File, array.lisp: The xarray/functionality/array․lisp file
File, atoms.lisp: The xarray/functionality/atoms․lisp file
File, conditions.lisp: The xarray/basics/conditions․lisp file
File, interface.lisp: The xarray/basics/interface․lisp file
File, operations.lisp: The xarray/functionality/operations․lisp file
File, package.lisp: The xarray/package-init/package․lisp file
File, sequences.lisp: The xarray/functionality/sequences․lisp file
File, types.lisp: The xarray/basics/types․lisp file
File, utilities.lisp: The xarray/basics/utilities․lisp file
File, view.lisp: The xarray/functionality/view․lisp file
File, xarray.asd: The xarray/xarray․asd file
fixnum-vector: Private types
flat-xview: Public classes
functionality: The xarray/functionality module

I
int-seq: Public classes
interface.lisp: The xarray/basics/interface․lisp file

M
Module, basics: The xarray/basics module
Module, functionality: The xarray/functionality module
Module, package-init: The xarray/package-init module

O
operations.lisp: The xarray/functionality/operations․lisp file

P
Package, xarray: The xarray package
Package, xarray-asd: The xarray-asd package
package-init: The xarray/package-init module
package.lisp: The xarray/package-init/package․lisp file
permutation-xview: Public classes

S
seq: Private classes
sequences.lisp: The xarray/functionality/sequences․lisp file
System, xarray: The xarray system

T
Type, fixnum-vector: Private types
types.lisp: The xarray/basics/types․lisp file

U
utilities.lisp: The xarray/basics/utilities․lisp file

V
view.lisp: The xarray/functionality/view․lisp file

X
xarray: The xarray system
xarray: The xarray package
xarray-asd: The xarray-asd package
xarray-like: Private classes
xarray.asd: The xarray/xarray․asd file
xdim-invalid-axis-number: Public conditions
xref-incompatible-type: Public conditions
xref-setting-readonly: Public conditions
xref-subscript-out-of-bounds: Public conditions
xref-wrong-number-of-subscripts: Public conditions
xslice-xview: Public classes
xview: Public classes