File: Scientific_42.html

package info (click to toggle)
python-scientific 2.2-5
  • links: PTS
  • area: main
  • in suites: woody
  • size: 1,368 kB
  • ctags: 2,396
  • sloc: python: 6,468; ansic: 3,643; xml: 3,596; makefile: 79; sh: 27
file content (16 lines) | stat: -rw-r--r-- 718 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
<a name="Module:Scientific.indexing"><h1>Module Scientific.indexing</h1></a>

<p>This module provides a convenient method for constructing
array indices algorithmically. It provides one importable object,
<tt>index_expression</tt>.</p>

<p>For any index combination, including slicing and axis insertion,
<tt>a[indices]</tt> is the same as <tt>a[index_expression[indices]]</tt> for any
array <tt>a</tt>. However, <tt>index_expression[indices]</tt> can be used anywhere
in Python code and returns a tuple of indexing objects that can be
used in the construction of complex index expressions.</p>

<p>Sole restriction: Slices must be specified in the double-colon
form, i.e. a[::] is allowed, whereas a[:] is not.
</p>