~ubuntu-branches/ubuntu/feisty/python-numpy/feisty

« back to all changes in this revision

Viewing changes to numpy/f2py/docs/usersguide/common_session.dat

  • Committer: Bazaar Package Importer
  • Author(s): Matthias Klose
  • Date: 2006-07-12 10:00:24 UTC
  • Revision ID: james.westby@ubuntu.com-20060712100024-5lw9q2yczlisqcrt
Tags: upstream-0.9.8
ImportĀ upstreamĀ versionĀ 0.9.8

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
>>> import common
 
2
>>> print common.data.__doc__
 
3
i - 'i'-scalar
 
4
x - 'i'-array(4)
 
5
a - 'f'-array(2,3)
 
6
 
 
7
>>> common.data.i = 5
 
8
>>> common.data.x[1] = 2 
 
9
>>> common.data.a = [[1,2,3],[4,5,6]]
 
10
>>> common.foo()
 
11
 I= 5
 
12
 X=[ 0 2 0 0]
 
13
 A=[
 
14
 [  1.,  2.,  3.]
 
15
 [  4.,  5.,  6.]
 
16
 ]
 
17
>>> common.data.a[1] = 45
 
18
>>> common.foo()
 
19
 I= 5
 
20
 X=[ 0 2 0 0]
 
21
 A=[
 
22
 [  1.,  2.,  3.]
 
23
 [  45.,  45.,  45.]
 
24
 ]
 
25
>>> common.data.a                 # a is Fortran-contiguous
 
26
array([[  1.,   2.,   3.],
 
27
       [ 45.,  45.,  45.]],'f')