Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 60 lines (37 sloc) 1.62 kb
bce31b0 Added compatibility information
Travis Oliphant authored
1
2
8b1e2f9 Add a few more docstrings using add_docstring.
Travis Oliphant authored
3 X.flat returns an indexable 1-D iterator (mostly similar to an array
4 but always 1-d) --- only has .copy and .__array__ attributes of an array!!!
bce31b0 Added compatibility information
Travis Oliphant authored
5
0283b6f Moved .dtypedescr to .dtype; .dtype->.dtype.type; .dtypestr ->.dtype.str...
Travis Oliphant authored
6 .typecode() --> .dtype.char
bce31b0 Added compatibility information
Travis Oliphant authored
7
a75a2b1 Mild changes and version number upgrade.
Travis Oliphant authored
8 .iscontiguous() --> .flags['CONTIGUOUS'] or .flags.contiguous
bce31b0 Added compatibility information
Travis Oliphant authored
9
10 .byteswapped() -> .byteswap()
11
12 .itemsize() -> .itemsize
13
8b1e2f9 Add a few more docstrings using add_docstring.
Travis Oliphant authored
14 .toscalar() -> .item()
15
bce31b0 Added compatibility information
Travis Oliphant authored
16 If you used typecode characters:
17
fcb7fd2 Add loadtxt and savetxt adapted from matplotlib.
Travis Oliphant authored
18 'c' -> 'S1' or 'c'
bce31b0 Added compatibility information
Travis Oliphant authored
19 'b' -> 'B'
20 '1' -> 'b'
21 's' -> 'h'
22 'w' -> 'H'
23 'u' -> 'I'
24
25
26 C -level
27
8b1e2f9 Add a few more docstrings using add_docstring.
Travis Oliphant authored
28 some API calls that used to take PyObject * now take PyArrayObject *
29 (this should only cause warnings during compile and not actual problems).
bce31b0 Added compatibility information
Travis Oliphant authored
30 PyArray_Take
31
32 These commands now return a buffer that must be freed once it is used
8b1e2f9 Add a few more docstrings using add_docstring.
Travis Oliphant authored
33 using PyMemData_FREE(ptr);
bce31b0 Added compatibility information
Travis Oliphant authored
34
35 a->descr->zero --> PyArray_Zero(a)
36 a->descr->one --> PyArray_One(a)
37
fcb7fd2 Add loadtxt and savetxt adapted from matplotlib.
Travis Oliphant authored
38 Numeric/arrayobject.h --> numpy/oldnumeric.h
bce31b0 Added compatibility information
Travis Oliphant authored
39
40
41 # These will actually work and are defines for PyArray_BYTE,
42 # but you really should change it in your code
fcb7fd2 Add loadtxt and savetxt adapted from matplotlib.
Travis Oliphant authored
43 PyArray_CHAR --> PyArray_CHAR
8b1e2f9 Add a few more docstrings using add_docstring.
Travis Oliphant authored
44 (or PyArray_STRING which is more flexible)
bce31b0 Added compatibility information
Travis Oliphant authored
45 PyArray_SBYTE --> PyArray_BYTE
46
47 Any uses of character codes will need adjusting....
48 use PyArray_XXXLTR where XXX is the name of the type.
49
50
51 If you used function pointers directly (why did you do that?),
8b1e2f9 Add a few more docstrings using add_docstring.
Travis Oliphant authored
52 the arguments have changed. Everything that was an int is now an intp.
53 Also, arrayobjects should be passed in at the end.
bce31b0 Added compatibility information
Travis Oliphant authored
54
55 a->descr->cast[i](fromdata, fromstep, todata, tostep, n)
56 a->descr->cast[i](fromdata, todata, n, PyArrayObject *in, PyArrayObject *out)
6de1ded Added more COMPATIBILITY info.
Travis Oliphant authored
57 anything but single-stepping is not supported by this function
58 use the PyArray_CastXXXX functions.
bce31b0 Added compatibility information
Travis Oliphant authored
59
Something went wrong with that request. Please try again.