API Reference

Axis

Axis(labels[, name])

Represents an axis.

Exploring

Axis.name

Name of the axis. None in the case of an anonymous axis.

Axis.labels

Labels of the axis.

Axis.labels_summary

Short representation of the labels.

Axis.dtype

Data type for the axis labels.

Copying

Axis.copy()

Return a copy of the axis.

Searching

Axis.index(key)

Translate a label key to its numerical index counterpart.

Axis.containing(substring)

Return a group with all the labels containing the specified substring.

Axis.startingwith(prefix)

Return a group with the labels starting with the specified string.

Axis.endingwith(suffix)

Return a group with the labels ending with the specified string.

Axis.matching([deprecated, pattern, regex])

Return a group with all the labels matching the specified pattern or regular expression.

Axis.min()

Get minimum of labels.

Axis.max()

Get maximum of labels.

Modifying/Selecting

Axis.__getitem__(key)

Return a group (list or unique element) of label(s) usable in .sum or .filter.

Axis.i

Take a subset using positions along the axis instead of labels.

Axis.by(length[, step, template])

Split axis into several groups of specified length.

Axis.rename(name)

Rename the axis.

Axis.extend(labels)

Append new labels to an axis or increase its length in case of wildcard axis.

Axis.insert(new_labels[, before, after])

Return a new axis with new_labels inserted before before or after after.

Axis.replace(old[, new])

Return a new axis with some labels replaced.

Axis.apply(func)

Return a new axis with the labels transformed by func.

Axis.union(other)

Return axis with the union of this axis labels and other labels.

Axis.intersection(other)

Return axis with the (set) intersection of this axis labels and other labels.

Axis.difference(other)

Return axis with the (set) difference of this axis labels and other labels.

Axis.align(other[, join])

Align axis with other object using specified join method.

Axis.split([sep, names, regex, return_labels])

Split axis and returns a list of Axis.

Axis.ignore_labels()

Return a wildcard axis with the same name and length than this axis.

Axis.astype(dtype[, casting])

Cast labels to a specified type.

Testing

Axis.iscompatible(other)

Check if this axis is compatible with another axis.

Axis.equals(other)

Check if this axis is equal to another axis.

Save

Axis.to_hdf(filepath[, key])

Write axis to a HDF file.

Group

IGroup

IGroup(key[, name, axis])

Index Group.

IGroup.named(name)

Return group with a different name.

IGroup.with_axis(axis)

Return group with a different axis.

IGroup.by(length[, step, template])

Split group into several groups of specified length.

IGroup.equals(other)

Check if this group is equal to another group.

IGroup.translate([bound, stop])

compute position(s) of group.

IGroup.union(other)

Return (set) union of this label group and other.

IGroup.intersection(other)

Return (set) intersection of this label group and other.

IGroup.difference(other)

Return (set) difference of this label group and other.

IGroup.containing(substring)

Return a group with all the labels containing the specified substring.

IGroup.startingwith(prefix)

Return a group with the labels starting with the specified string.

IGroup.endingwith(suffix)

Return a group with the labels ending with the specified string.

IGroup.matching([deprecated, pattern, regex])

Return a group with all the labels matching the specified pattern or regular expression.

IGroup.to_hdf(filepath[, key, axis_key])

Write group to a HDF file.

LGroup

LGroup(key[, name, axis])

Label group.

LGroup.named(name)

Return group with a different name.

LGroup.with_axis(axis)

Return group with a different axis.

LGroup.by(length[, step, template])

Split group into several groups of specified length.

LGroup.equals(other)

Check if this group is equal to another group.

LGroup.translate([bound, stop])

compute position(s) of group.

LGroup.union(other)

Return (set) union of this label group and other.

LGroup.intersection(other)

Return (set) intersection of this label group and other.

LGroup.difference(other)

Return (set) difference of this label group and other.

LGroup.containing(substring)

Return a group with all the labels containing the specified substring.

LGroup.startingwith(prefix)

Return a group with the labels starting with the specified string.

LGroup.endingwith(suffix)

Return a group with the labels ending with the specified string.

LGroup.matching([deprecated, pattern, regex])

Return a group with all the labels matching the specified pattern or regular expression.

LGroup.to_hdf(filepath[, key, axis_key])

Write group to a HDF file.

LSet

LSet(key[, name, axis])

Label set.

AxisCollection

AxisCollection([axes])

AxisCollection.names

Return the list of (raw) names of the axes.

AxisCollection.display_names

Return the list of (display) names of the axes.

AxisCollection.labels

Return the list of labels of the axes.

AxisCollection.shape

Return the shape of the collection.

AxisCollection.size

Return the size of the collection, i.e. the number of elements of the array.

AxisCollection.info

Describe the collection (shape and labels for each axis).

AxisCollection.copy()

Return a copy.

Searching

AxisCollection.keys()

Return list of all axis names.

AxisCollection.index(axis[, compatible])

Return the index of axis.

AxisCollection.axis_id(axis)

Return the id of an axis.

AxisCollection.ids

Return the list of ids of the axes.

AxisCollection.iter_labels([axes, ascending])

Return a view of the axes labels.

Modifying/Selecting

AxisCollection.get(key[, default, name])

Return axis corresponding to key.

AxisCollection.get_by_pos(key, i)

Return axis corresponding to a key, or to position i if the key has no name and key object not found.

AxisCollection.get_all(key)

Return all axes from key if present and length 1 wildcard axes otherwise.

AxisCollection.pop([axis])

Remove and return an axis.

AxisCollection.append(axis)

Append axis at the end of the collection.

AxisCollection.extend(axes[, validate, ...])

Extend the collection by appending the axes from axes.

AxisCollection.insert(index, axis)

Insert axis before index.

AxisCollection.rename([renames, to])

Rename axes of the collection.

AxisCollection.replace([axes_to_replace, ...])

Replace one, several or all axes of the collection.

AxisCollection.set_labels([axis, labels, ...])

Replace the labels of one or several axes.

AxisCollection.without(axes)

Return a new collection without some axes.

AxisCollection.combine_axes([axes, sep, ...])

Combine several axes into one.

AxisCollection.split_axes([axes, sep, ...])

Split axes and returns a new collection.

AxisCollection.align(other[, join, axes])

Align this axis collection with another.

Testing

AxisCollection.isaxis(value)

Test if input is an Axis object or the name of an axis contained in self.

AxisCollection.check_compatible(axes)

Check if axes passed as argument are compatible with those contained in the collection.

Array

Overview

Array(data[, axes, title, meta, dtype])

An Array object represents a multidimensional, homogeneous array of fixed-size items with labeled axes.

Array Creation Functions

sequence(axis[, initial, inc, mult, func, ...])

Create an array by sequentially applying modifications to the array along axis.

ndtest(shape_or_axes[, start, label_start, ...])

Return test array with given shape.

zeros(axes[, title, dtype, order, meta])

Return an array with the specified axes and filled with zeros.

zeros_like(array[, title, dtype, order, meta])

Return an array with the same axes as array and filled with zeros.

ones(axes[, title, dtype, order, meta])

Return an array with the specified axes and filled with ones.

ones_like(array[, title, dtype, order, meta])

Return an array with the same axes as array and filled with ones.

empty(axes[, title, dtype, order, meta])

Return an array with the specified axes and uninitialized (arbitrary) data.

empty_like(array[, title, dtype, order, meta])

Return an array with the same axes as array and uninitialized (arbitrary) data.

full(axes, fill_value[, title, dtype, ...])

Return an array with the specified axes and filled with fill_value.

full_like(array, fill_value[, title, dtype, ...])

Return an array with the same axes and type as input array and filled with fill_value.

Copying

Array.copy()

Return a copy of the array.

Array.astype(dtype[, order, casting, subok, ...])

Copy of the array, cast to a specified type.

Inspecting

Array.data

Data of the array (Numpy ndarray)

Array.axes

Axes of the array (AxisCollection)

Array.title

Title of the array (str)

Array.info

Describe an Array (metadata + shape and labels for each axis).

Array.shape

Return the shape of the array as a tuple.

Array.ndim

Return the number of dimensions of the array.

Array.dtype

Return the type of the data of the array.

Array.size

Return the number of elements in array.

Array.nbytes

Return the number of bytes used to store the array in memory.

Array.memory_used

Return the memory consumed by the array in human readable form.

Modifying/Selecting

Array.i

Allows selection of a subset using indices of labels.

Array.points

Allows selection of arbitrary items in the array based on their N-dimensional label index.

Array.ipoints

Allows selection of arbitrary items in the array based on their N-dimensional index.

Array.iflat

Access the array by index as if it was flat (one dimensional) and all its axes were combined.

Array.set(value, **kwargs)

Set a subset of array to value.

Array.drop([labels])

Return array without some labels or indices along an axis.

Array.ignore_labels([axes])

Ignore labels from axes (replace those axes by "wildcard" axes).

Array.filter([collapse])

Filter the array along the axes given as keyword arguments.

Array.apply(transform, *args[, by, axes, ...])

Apply a transformation function to array elements.

Array.apply_map(mapping[, dtype])

Apply a transformation mapping to array elements.

Changing Axes or Labels

Array.set_axes([axes_to_replace, new_axis, ...])

Replace one, several or all axes of the array.

Array.rename([renames, to, inplace])

Rename axes of the array.

Array.set_labels([axis, labels, inplace])

Replace the labels of one or several axes of the array.

Array.combine_axes([axes, sep, wildcard])

Combine several axes into one.

Array.split_axes([axes, sep, names, regex, ...])

Split axes and returns a new array.

Array.reverse([axes])

Reverse axes of an array.

Aggregation Functions

Array.sum(*axes_and_groups[, dtype, out, ...])

Compute the sum of array elements along given axes/groups.

Array.sum_by(*axes_and_groups[, dtype, out, ...])

Compute the sum of array elements for the given axes/groups.

Array.prod(*axes_and_groups[, dtype, out, ...])

Compute the product of array elements along given axes/groups.

Array.prod_by(*axes_and_groups[, dtype, ...])

Compute the product of array elements for the given axes/groups.

Array.cumsum([axis])

Return the cumulative sum of array elements along an axis.

Array.cumprod([axis])

Return the cumulative product of array elements.

Array.mean(*axes_and_groups[, dtype, out, ...])

Compute the arithmetic mean.

Array.mean_by(*axes_and_groups[, dtype, ...])

Compute the arithmetic mean.

Array.median(*axes_and_groups[, out, ...])

Compute the arithmetic median.

Array.median_by(*axes_and_groups[, out, ...])

Compute the arithmetic median.

Array.var(*axes_and_groups[, dtype, ddof, ...])

Compute the unbiased variance.

Array.var_by(*axes_and_groups[, dtype, ...])

Compute the unbiased variance.

Array.std(*axes_and_groups[, dtype, ddof, ...])

Compute the sample standard deviation.

Array.std_by(*axes_and_groups[, dtype, ...])

Compute the sample standard deviation.

Array.percentile(q, *axes_and_groups[, out, ...])

Compute the qth percentile of the data along the specified axis.

Array.percentile_by(q, *axes_and_groups[, ...])

Compute the qth percentile of the data for the specified axis.

Array.ptp(*axes_and_groups[, out])

Return the range of values (maximum - minimum).

Array.with_total(*args[, op, label])

Add aggregated values (sum by default) along each axis.

Array.percent(*axes)

Return an array with values given as percent of the total of all values along given axes.

Array.ratio(*axes)

Return an array with all values divided by the sum of values along given axes.

Array.rationot0(*axes)

Return an Array with values array / array.sum(axes) where the sum is not 0, 0 otherwise.

Array.growth_rate([axis, d, label])

Compute the growth along a given axis.

Array.describe(*args[, percentiles])

Descriptive summary statistics, excluding NaN values.

Array.describe_by(*args[, percentiles])

Descriptive summary statistics, excluding NaN values, along axes or for groups.

Array.value_counts()

Count number of occurrences of each unique value in array.

Sorting

Array.sort_labels([axes, ascending])

Sort labels of axes of the array.

Array.sort_values([key, axis, ascending])

Sort values of the array.

Array.labelsofsorted([axis, ascending, kind])

Return the labels that would sort this array.

Array.indicesofsorted([axis, ascending, kind])

Return the indices that would sort this array.

Reshaping/Extending/Reordering

Array.reshape(target_axes)

Given a list of new axes, changes the shape of the array.

Array.reshape_like(target)

Same as reshape but with an array as input.

Array.compact([display, name])

Detect and remove "useless" axes (ie axes for which values are constant over the whole axis).

Array.reindex([axes_to_reindex, new_axis, ...])

Reorder and/or add new labels in axes.

Array.transpose(*args)

Reorder axes.

Array.expand([target_axes, out, readonly])

Expand this array to target_axes.

Array.prepend(axis, value[, label])

Add an array before this array along an axis.

Array.append(axis, value[, label])

Add a value to this array along an axis.

Array.extend(**kwargs)

Array.insert(value[, before, after, pos, ...])

Insert value in array along an axis.

Array.broadcast_with(target[, check_compatible])

Return an array that is (NumPy) broadcastable with target.

Array.align(other[, join, fill_value, axes])

Align two arrays on their axes with the specified join method.

Testing/Searching

Array.equals(other[, rtol, atol, ...])

Compare this array with another array and returns True if they have the same axes and elements, False otherwise.

Array.allclose(other[, rtol, atol, ...])

Compare this array with another array and returns True if they are element-wise equal within a tolerance.

Array.eq(other[, rtol, atol, nans_equal])

Compare this array with another array element-wise and returns an array of booleans.

Array.isin(test_values[, assume_unique, invert])

Compute whether each element of this array is in test_values.

Array.nonzero()

Return the indices of the elements that are non-zero.

Array.all(*axes_and_groups[, out, skipna, ...])

Test whether all selected elements evaluate to True.

Array.all_by(*axes_and_groups[, out, ...])

Test whether all selected elements evaluate to True.

Array.any(*axes_and_groups[, out, skipna, ...])

Test whether any selected elements evaluate to True.

Array.any_by(*axes_and_groups[, out, ...])

Test whether any selected elements evaluate to True.

Array.min(*axes_and_groups[, out, skipna, ...])

Get minimum of array elements along given axes/groups.

Array.min_by(*axes_and_groups[, out, ...])

Get minimum of array elements for the given axes/groups.

Array.max(*axes_and_groups[, out, skipna, ...])

Get maximum of array elements along given axes/groups.

Array.max_by(*axes_and_groups[, out, ...])

Get maximum of array elements for the given axes/groups.

Array.labelofmin([axis])

Return labels of the minimum values along a given axis.

Array.indexofmin([axis])

Return indices of the minimum values along a given axis.

Array.labelofmax([axis])

Return labels of the maximum values along a given axis.

Array.indexofmax([axis])

Return indices of the maximum values along a given axis.

Iterating

Array.keys([axes, ascending])

Return a view on the array labels along axes.

Array.values([axes, ascending])

Return a view on the values of the array along axes.

Array.items([axes, ascending])

Return a (label, value) view of the array along axes.

Operators

@

Matrix multiplication

Miscellaneous

Array.divnot0(other)

Divide this array by other, but return 0.0 where other is 0.

Array.clip([minval, maxval, out])

Clip (limit) the values in an array.

Array.shift(axis[, n])

Shift the cells of the array n-times to the right along axis.

Array.roll([axis, n])

Roll the cells of the array n-times to the right along axis.

Array.diff([axis, d, n, label])

Compute the n-th order discrete difference along a given axis.

Array.unique([axes, sort, sep])

Return unique values (optionally along axes).

Array.to_clipboard(*args, **kwargs)

Send the content of the array to the clipboard.

Converting to Pandas objects

Array.to_series([name, dropna])

Convert an Array into a Pandas Series.

Array.to_frame([fold_last_axis_name, dropna])

Convert an Array into a Pandas DataFrame.

Plotting

Array.plot

Plot the data of the array into a graph (window pop-up).

Utility Functions

Miscellaneous

where(condition, x, y)

Return elements, either from x or y, depending on condition.

maximum(x1, x2[, out, dtype])

Element-wise maximum of array elements.

minimum(x1, x2[, out, dtype])

Element-wise minimum of array elements.

inverse(*args, **kwargs)

Compute the (multiplicative) inverse of a matrix.

interp(*args, **kwargs)

One-dimensional linear interpolation for monotonically increasing sample points.

convolve(*args, **kwargs)

Returns the discrete, linear convolution of two one-dimensional sequences.

absolute(x, /[, out, where, casting, order, ...])

Calculate the absolute value element-wise.

fabs(x, /[, out, where, casting, order, ...])

Compute the absolute values element-wise.

isscalar(element)

Return True if the type of element is a scalar type.

isnan(x, /[, out, where, casting, order, ...])

Test element-wise for NaN and return result as a boolean array.

isinf(x, /[, out, where, casting, order, ...])

Test element-wise for positive or negative infinity.

nan_to_num(*args, **kwargs)

Replace NaN with zero and infinity with large finite numbers (default behaviour) or with the numbers defined by the user using the nan, posinf and/or neginf keywords.

sqrt(x, /[, out, where, casting, order, ...])

Return the non-negative square-root of an array, element-wise.

i0(*args, **kwargs)

Modified Bessel function of the first kind, order 0.

sinc(*args, **kwargs)

Return the normalized sinc function.

Rounding

round(*args, **kwargs)

Evenly round to the given number of decimals.

floor(x, /[, out, where, casting, order, ...])

Return the floor of the input, element-wise.

ceil(x, /[, out, where, casting, order, ...])

Return the ceiling of the input, element-wise.

trunc(x, /[, out, where, casting, order, ...])

Return the truncated value of the input, element-wise.

rint(x, /[, out, where, casting, order, ...])

Round elements of the array to the nearest integer.

fix(*args, **kwargs)

Round to nearest integer towards zero.

Exponents And Logarithms

exp(x, /[, out, where, casting, order, ...])

Calculate the exponential of all elements in the input array.

expm1(x, /[, out, where, casting, order, ...])

Calculate exp(x) - 1 for all elements in the array.

exp2(x, /[, out, where, casting, order, ...])

Calculate 2**p for all p in the input array.

log(x, /[, out, where, casting, order, ...])

Natural logarithm, element-wise.

log10(x, /[, out, where, casting, order, ...])

Return the base 10 logarithm of the input array, element-wise.

log2(x, /[, out, where, casting, order, ...])

Base-2 logarithm of x.

log1p(x, /[, out, where, casting, order, ...])

Return the natural logarithm of one plus the input array, element-wise.

logaddexp(x1, x2, /[, out, where, casting, ...])

Logarithm of the sum of exponentiations of the inputs.

logaddexp2(x1, x2, /[, out, where, casting, ...])

Logarithm of the sum of exponentiations of the inputs in base-2.

Trigonometric functions

sin(x, /[, out, where, casting, order, ...])

Trigonometric sine, element-wise.

cos(x, /[, out, where, casting, order, ...])

Cosine element-wise.

tan(x, /[, out, where, casting, order, ...])

Compute tangent element-wise.

arcsin(x, /[, out, where, casting, order, ...])

Inverse sine, element-wise.

arccos(x, /[, out, where, casting, order, ...])

Trigonometric inverse cosine, element-wise.

arctan(x, /[, out, where, casting, order, ...])

Trigonometric inverse tangent, element-wise.

hypot(x1, x2, /[, out, where, casting, ...])

Given the "legs" of a right triangle, return its hypotenuse.

arctan2(x1, x2, /[, out, where, casting, ...])

Element-wise arc tangent of x1/x2 choosing the quadrant correctly.

degrees(x, /[, out, where, casting, order, ...])

Convert angles from radians to degrees.

radians(x, /[, out, where, casting, order, ...])

Convert angles from degrees to radians.

unwrap(*args, **kwargs)

Unwrap by taking the complement of large deltas with respect to the period.

Hyperbolic functions

sinh(x, /[, out, where, casting, order, ...])

Hyperbolic sine, element-wise.

cosh(x, /[, out, where, casting, order, ...])

Hyperbolic cosine, element-wise.

tanh(x, /[, out, where, casting, order, ...])

Compute hyperbolic tangent element-wise.

arcsinh(x, /[, out, where, casting, order, ...])

Inverse hyperbolic sine element-wise.

arccosh(x, /[, out, where, casting, order, ...])

Inverse hyperbolic cosine, element-wise.

arctanh(x, /[, out, where, casting, order, ...])

Inverse hyperbolic tangent element-wise.

Complex Numbers

angle(*args, **kwargs)

Return the angle of the complex argument.

real(*args, **kwargs)

Return the real part of the complex argument.

imag(*args, **kwargs)

Return the imaginary part of the complex argument.

conj(x, /[, out, where, casting, order, ...])

Return the complex conjugate, element-wise.

Floating Point Routines

signbit(x, /[, out, where, casting, order, ...])

Returns element-wise True where signbit is set (less than zero).

copysign(x1, x2, /[, out, where, casting, ...])

Change the sign of x1 to that of x2, element-wise.

frexp(x[, out1, out2], / [[, out, where, ...])

Decompose the elements of x into mantissa and twos exponent.

ldexp(x1, x2, /[, out, where, casting, ...])

Returns x1 * 2**x2, element-wise.

Metadata

Metadata

An ordered dictionary allowing key-values accessibly using attribute notation (AttributeDict.attribute) instead of key notation (Dict["key"]).

Input/Output

Read

read_csv(filepath_or_buffer[, nb_axes, ...])

Read csv file and returns an array with the contents.

read_tsv(filepath_or_buffer, **kwargs)

read_excel(filepath[, sheet, nb_axes, ...])

Read excel file from sheet name and returns an Array with the contents.

read_hdf(filepath_or_buffer, key[, ...])

Read a scalar or an axis or group or array named key from a HDF5 file in filepath (path+name).

read_eurostat(filepath_or_buffer, **kwargs)

Read EUROSTAT TSV (tab-separated) file into an array.

read_sas(filepath[, nb_axes, index_col, ...])

Read sas file and returns an Array with the contents

read_stata(filepath_or_buffer[, index_col, ...])

Read Stata .dta file and returns an Array with the contents.

Write

Array.to_csv(filepath[, sep, na_rep, wide, ...])

Write array to a csv file.

Array.to_excel([filepath, sheet, position, ...])

Write array in the specified sheet of specified excel workbook.

Array.to_hdf(filepath, key)

Write array to a HDF file.

Array.to_stata(filepath_or_buffer, **kwargs)

Write array to a Stata .dta file.

Array.dump(self[, header, wide, value_name, ...])

Dump array as a 2D nested list.

Excel

open_excel([filepath, overwrite_file, ...])

Open an Excel workbook

Workbook([filepath, overwrite_file, ...])

Excel Workbook.

Workbook.sheet_names()

Return the names of the Excel sheets.

Workbook.save([path])

Saves the Workbook.

Workbook.close()

Close the workbook in Excel.

Workbook.app()

Return the Excel instance this workbook is attached to.

ExcelReport

ExcelReport()

Automate the generation of multiple graphs in an Excel file.

ExcelReport.template_dir

Set the path to the directory containing the Excel template files (with '.crtx' extension).

ExcelReport.template

Set a default Excel template file.

ExcelReport.set_item_default_size(kind[, ...])

Override the default 'width' and 'height' values for the given kind of item.

ExcelReport.graphs_per_row

Default number of graphs per row.

ExcelReport.new_sheet(sheet_name)

Add a new empty output sheet.

ExcelReport.sheet_names()

Return the names of the output sheets.

ExcelReport.to_excel(filepath[, ...])

Generate the report Excel file.

ReportSheet

ReportSheet()

Represents a sheet dedicated to contains only graphical items (title banners, graphs).

ReportSheet.template_dir

Set the path to the directory containing the Excel template files (with '.crtx' extension).

ReportSheet.template

Set a default Excel template file.

ReportSheet.set_item_default_size(kind[, ...])

Override the default 'width' and 'height' values for the given kind of item.

ReportSheet.graphs_per_row

Default number of graphs per row.

ReportSheet.add_title(title[, width, ...])

Add a title item to the current sheet.

ReportSheet.add_graph(data[, title, ...])

Add a graph item to the current sheet.

ReportSheet.add_graphs(array_per_title, ...)

Add multiple graph items to the current sheet.

ReportSheet.newline()

Force a new row of graphs.

Miscellaneous

asarray(a[, meta])

Convert input as Array if possible.

from_frame(df[, sort_rows, sort_columns, ...])

Convert Pandas DataFrame into Array.

from_series(s[, sort_rows, fill_value, meta])

Convert Pandas Series into Array.

get_example_filepath(fname)

Return absolute path to an example file if exist.

set_options(**kwargs)

Set options for larray in a controlled context.

get_options()

Return the current options.

labels_array(axes[, title, meta])

Return an array with specified axes and the combination of corresponding labels as values.

union(*args)

Return the union of several "value strings" as a list.

stack([elements, axes, title, meta, dtype, ...])

Combine several arrays or sessions along an axis.

identity(axis)

diag(a[, k, axes, ndim, split])

Extract a diagonal or construct a diagonal array.

eye(rows[, columns, k, title, dtype, meta])

Return a 2-D array with ones on the diagonal and zeros elsewhere.

ipfp(target_sums[, a, axes, maxiter, ...])

Apply Iterative Proportional Fitting Procedure (also known as bi-proportional fitting in statistics, RAS algorithm in economics) to array a, with target_sums as targets.

wrap_elementwise_array_func(func[, doc])

Wrap a function using numpy arrays to work with LArray arrays instead.

zip_array_values(values[, axes, ascending])

Return a sequence as if simultaneously iterating on several arrays.

zip_array_items(values[, axes, ascending])

Return a sequence as if simultaneously iterating on several arrays as well as the current iteration "key".

Session

Session(*args[, meta])

Groups several objects together.

arrays([depth, include_private, meta])

Return a session containing all available arrays (whether they are defined in local or global variables) sorted in alphabetical order.

local_arrays([depth, include_private, meta])

Return a session containing all local arrays sorted in alphabetical order.

global_arrays([depth, include_private, meta])

Return a session containing all global arrays sorted in alphabetical order.

load_example_data(name)

Load arrays used in the tutorial so that all examples in it can be reproduced.

Exploring

Session.names

Return the list of names of the objects in the session.

Session.keys()

Return a view on the session's keys.

Session.values()

Return a view on the session's values.

Session.items()

Return a view of the session's items ((key, value) pairs).

Session.summary([template])

Return a summary of the content of the session.

Copying

Session.copy()

Return a copy of the session.

Testing

Session.element_equals(other[, rtol, atol, ...])

Test if each element (group, axis and array) of the current session equals the corresponding element of another session.

Session.equals(other[, rtol, atol, nans_equal])

Test if all elements (groups, axes and arrays) of the current session are equal to those of another session.

Selecting

Session.get(key[, default])

Return the object corresponding to the key.

Modifying

Session.add(*args, **kwargs)

Deprecated.

Session.update([other])

Update the session with the key/value pairs from other or passed keyword arguments, overwriting existing keys.

Session.apply(func, *args[, kind])

Apply function func on elements of the session and return a new session.

Session.transpose(*args)

Reorder axes of arrays in session, ignoring missing axes for each array.

Filtering/Cleaning

Session.filter([pattern, kind])

Return a new session with objects which match some criteria.

Session.compact([display])

Detect and remove "useless" axes (ie axes for which values are constant over the whole axis) for all array objects in session.

Load/Save

Session.load(fname[, names, engine, display])

Load objects from a file, or several .csv files.

Session.save(fname[, names, engine, ...])

Dump objects from the current session to a file, or several .csv files.

Session.to_csv(fname[, names, display])

Dump Array objects from the current session to CSV files.

Session.to_excel(fname[, names, overwrite, ...])

Dump Array objects from the current session to an Excel file.

Session.to_hdf(fname[, names, overwrite, ...])

Dump objects from the current session to an HDF file.

Session.to_pickle(fname[, names, overwrite, ...])

Dump objects from the current session to a file using pickle.

CheckedArray

CheckedArray(axes[, dtype])

CheckedSession

CheckedSession(*args[, meta])

Class intended to be inherited by user defined classes in which the variables of a model are declared.

CheckedParameters

CheckedParameters(*args[, meta])

Same as py:class:CheckedSession but declared variables cannot be modified after initialization.

Editor

view([obj, title, depth])

Open a new viewer window.

edit([obj, title, minvalue, maxvalue, ...])

Open a new editor window.

debug([depth])

Open a new debug window.

compare(*args[, depth])

Open a new comparator window, comparing arrays or sessions.

run_editor_on_exception([root_path, ...])

Run the editor when an unhandled exception (a fatal error) happens.

Random

random.randint(low[, high, axes, dtype, meta])

Return random integers from low (inclusive) to high (exclusive).

random.normal([loc, scale, axes, meta])

Draw random samples from a normal (Gaussian) distribution.

random.uniform([low, high, axes, meta])

Draw samples from a uniform distribution.

random.permutation(x[, axis])

Randomly permute a sequence along an axis, or return a permuted range.

random.choice([choices, axes, replace, p, meta])

Generate a random sample from given choices.

Constants

nan

NaN (Not a Number)

inf

\(\infty\) (infinite)

pi

\(\pi\)

e

\(e\)

euler_gamma

Euler's \(\gamma\)