Skip to content

Commit

Permalink
fixed operations with numpy array as LHS operand
Browse files Browse the repository at this point in the history
  • Loading branch information
perrette committed Mar 25, 2014
1 parent be397f2 commit fa5c404
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 18 deletions.
5 changes: 3 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ Get started

A **``DimArray``** can be defined just like a numpy array, with
additional information about its axes, which can be given via ``labels``
and ``dims`` parameters.
and ``dims`` parameters (see below another example with a list of tuples [(name_0, values_0), ...]).

>>> from dimarray import DimArray, Dataset
>>> a = DimArray(values=[[1,2,3],[4,5,6.]], labels=[["a","b"], [0,1,2]], dims=['dim0','dim1'])
Expand Down Expand Up @@ -120,7 +120,8 @@ Having axis name and axis values allow on-the-fly **axis alignment** and
that rules can be defined for nearly every sequence of operands.

Let's define some axes on dimensions ``time`` and ``items``, using the
tuple form (name, values)
list-of-tuple form [(name, values), (name2, values2), ...], here reduced to simple `tuple` since
we are dealing with 1-D arrays.

>>> time = ('time', [1950, 1951, 1952])
>>> incomplete_time = ('time', [1950, 1952])
Expand Down
Loading

0 comments on commit fa5c404

Please sign in to comment.