Skip to content

Commit 0b0f13d

Browse files
committed
update pyobject method for more recent pytave, add doctest
1 parent 1d18f52 commit 0b0f13d

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

inst/@sym/pyobject.m

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
%% Copyright (C) 2016 Colin B. Macdonald
1+
%% Copyright (C) 2016-2017 Colin B. Macdonald
22
%%
33
%% This file is part of OctSymPy.
44
%%
@@ -24,10 +24,11 @@
2424
%% Example:
2525
%% @example
2626
%% @group
27+
%% @c doctest +SKIP_IF(~strcmp(sympref('ipc'), 'native')))
2728
%% syms x
2829
%% f = 2*sin(x/2);
2930
%% pyobject(f)
30-
%% @result{} ans = [pyobject ...]
31+
%% @result{} ans = [Python object of type sympy.core.mul.Mul]
3132
%%
3233
%% 2*sin(x/2)
3334
%%
@@ -39,7 +40,7 @@
3940

4041
function y = pyobject (x)
4142

42-
y = py.sympy.S (char (x));
43+
y = py.sympy.S (sympy (x));
4344

4445
% Above is nice because it needs no imports. But downside is some
4546
% things like NonElementaryIntegral and MatrixElement will fail. See

0 commit comments

Comments
 (0)