Mercurial > pytave
annotate NEWS @ 321:3afd890fff6d
Rewrite pyobject.cell, always return a cell array of the right size
* @pyobject/cell.m: Rewrite, ensuring return value is always a cell array
of the correct size. Add more %!tests.
author | Mike Miller <mtmiller@octave.org> |
---|---|
date | Thu, 11 Aug 2016 22:35:19 -0700 |
parents | 0c19ed1ce349 |
children |
rev | line source |
---|---|
36
ae4554656fa1
Added an eval function.
David Grundberg <individ@acc.umu.se>
parents:
33
diff
changeset
|
1 Version 0.1.1-bzr |
ae4554656fa1
Added an eval function.
David Grundberg <individ@acc.umu.se>
parents:
33
diff
changeset
|
2 |
101
0c19ed1ce349
Remove Numeric array support. Use numpy exclusively.
David Grundberg <individ@acc.umu.se>
parents:
44
diff
changeset
|
3 2012-04-09 |
0c19ed1ce349
Remove Numeric array support. Use numpy exclusively.
David Grundberg <individ@acc.umu.se>
parents:
44
diff
changeset
|
4 |
0c19ed1ce349
Remove Numeric array support. Use numpy exclusively.
David Grundberg <individ@acc.umu.se>
parents:
44
diff
changeset
|
5 * Removed Numeric array support. The Numeric array Python library is |
0c19ed1ce349
Remove Numeric array support. Use numpy exclusively.
David Grundberg <individ@acc.umu.se>
parents:
44
diff
changeset
|
6 deprecated. Pytave has used numpy and its extensions since several |
0c19ed1ce349
Remove Numeric array support. Use numpy exclusively.
David Grundberg <individ@acc.umu.se>
parents:
44
diff
changeset
|
7 years ago and it was time to reduce the effort to support both |
0c19ed1ce349
Remove Numeric array support. Use numpy exclusively.
David Grundberg <individ@acc.umu.se>
parents:
44
diff
changeset
|
8 libraries. |
0c19ed1ce349
Remove Numeric array support. Use numpy exclusively.
David Grundberg <individ@acc.umu.se>
parents:
44
diff
changeset
|
9 |
44 | 10 2009-05-25 |
11 | |
12 * Added functionality for explicit manipulation of variables. | |
13 getvar, setvar, isvar can be used to get, set and query variables | |
14 in the current Octave scope. | |
15 Example: | |
16 pytave.setvar("x", 1) | |
17 pytave.eval(0,"x += 1") | |
18 x = pytave.getvar("x") | |
19 | |
20 * Added functionality to push/pop anonymous scopes on the Octave call | |
21 stack. push_scope and pop_scope are provided to create an anonymous scope | |
22 and push it on Octave's call stack, to prevent cluttering other variables if | |
23 nested calls to pytave are in effect. | |
24 | |
25 Example: | |
26 pytave.push_scope() | |
27 pytave.setvar("x", something) | |
28 pytave.eval(0, "... do something with x) | |
29 pytave.pop_scope() # wipes out x and restores its previous value, if any | |
30 | |
31 Of course, for proper safety, try/finally block should be used to ensure the | |
32 cleanup. For convenience, a local_scope decorator is provided that encloses a | |
33 whole function in a push_scope/try/finally/pop_scope sequence: | |
34 | |
35 @pytave.local_scope | |
36 def my_oct_add(x,y): | |
37 pytave.setvar("x",x) | |
38 pytave.setvar("y",y) | |
39 result, = pytave.eval(1, "x + y") | |
40 return result | |
41 | |
42 this function, when called, will not affect the top-level values of x and y, if | |
43 any. | |
44 | |
45 * The Octave welcome banner is now only displayed if Python is run interactively. | |
46 | |
47 * {}, "" and '' are now accepted as return values and converted to an empty list/string. | |
48 | |
36
ae4554656fa1
Added an eval function.
David Grundberg <individ@acc.umu.se>
parents:
33
diff
changeset
|
49 2009-05-07 |
ae4554656fa1
Added an eval function.
David Grundberg <individ@acc.umu.se>
parents:
33
diff
changeset
|
50 |
ae4554656fa1
Added an eval function.
David Grundberg <individ@acc.umu.se>
parents:
33
diff
changeset
|
51 * Added an eval function. A string of Octave code can be executed |
ae4554656fa1
Added an eval function.
David Grundberg <individ@acc.umu.se>
parents:
33
diff
changeset
|
52 through this function. The returned values are converted to Python |
ae4554656fa1
Added an eval function.
David Grundberg <individ@acc.umu.se>
parents:
33
diff
changeset
|
53 objects as with the feval function. |
ae4554656fa1
Added an eval function.
David Grundberg <individ@acc.umu.se>
parents:
33
diff
changeset
|
54 |
ae4554656fa1
Added an eval function.
David Grundberg <individ@acc.umu.se>
parents:
33
diff
changeset
|
55 In principle, this could be achieved simply using feval("eval", but |
ae4554656fa1
Added an eval function.
David Grundberg <individ@acc.umu.se>
parents:
33
diff
changeset
|
56 the advantages to this implementation are: |
ae4554656fa1
Added an eval function.
David Grundberg <individ@acc.umu.se>
parents:
33
diff
changeset
|
57 |
ae4554656fa1
Added an eval function.
David Grundberg <individ@acc.umu.se>
parents:
33
diff
changeset
|
58 1. faster (avoids double call and double conversion of code string) |
ae4554656fa1
Added an eval function.
David Grundberg <individ@acc.umu.se>
parents:
33
diff
changeset
|
59 |
ae4554656fa1
Added an eval function.
David Grundberg <individ@acc.umu.se>
parents:
33
diff
changeset
|
60 2. explicit control of printing rather than implicitly with nargout |
ae4554656fa1
Added an eval function.
David Grundberg <individ@acc.umu.se>
parents:
33
diff
changeset
|
61 (as in eval) |
ae4554656fa1
Added an eval function.
David Grundberg <individ@acc.umu.se>
parents:
33
diff
changeset
|
62 |
ae4554656fa1
Added an eval function.
David Grundberg <individ@acc.umu.se>
parents:
33
diff
changeset
|
63 3. separate exception classes for parse error / execution error |
ae4554656fa1
Added an eval function.
David Grundberg <individ@acc.umu.se>
parents:
33
diff
changeset
|
64 |
ae4554656fa1
Added an eval function.
David Grundberg <individ@acc.umu.se>
parents:
33
diff
changeset
|
65 2009-05-05 |
22 | 66 |
33 | 67 * Added functionality for one-row cell arrays. The Python list is |
68 converted to a one-row cell array and vice versa. | |
22 | 69 |
37
798efee55cd0
Added --enable-float-matrices option. Some VPATH building issues fixed. Changelog now more standardized.
David Grundberg <individ@acc.umu.se>
parents:
36
diff
changeset
|
70 * Added functionality for structs. The Python dictionary is converted |
33 | 71 to a Octave struct and vice versa. The implementation tries to be |
72 as true as possible to Octave's struct constructor. | |
36
ae4554656fa1
Added an eval function.
David Grundberg <individ@acc.umu.se>
parents:
33
diff
changeset
|
73 |