From 0b0f13d463b4907fae7012fa3a398e5c4228894f Mon Sep 17 00:00:00 2001 From: "Colin B. Macdonald" Date: Fri, 19 May 2017 16:00:51 -0700 Subject: [PATCH] update pyobject method for more recent pytave, add doctest --- inst/@sym/pyobject.m | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/inst/@sym/pyobject.m b/inst/@sym/pyobject.m index 3bd1e58e2..baecc6158 100644 --- a/inst/@sym/pyobject.m +++ b/inst/@sym/pyobject.m @@ -1,4 +1,4 @@ -%% Copyright (C) 2016 Colin B. Macdonald +%% Copyright (C) 2016-2017 Colin B. Macdonald %% %% This file is part of OctSymPy. %% @@ -24,10 +24,11 @@ %% Example: %% @example %% @group +%% @c doctest +SKIP_IF(~strcmp(sympref('ipc'), 'native'))) %% syms x %% f = 2*sin(x/2); %% pyobject(f) -%% @result{} ans = [pyobject ...] +%% @result{} ans = [Python object of type sympy.core.mul.Mul] %% %% 2*sin(x/2) %% @@ -39,7 +40,7 @@ function y = pyobject (x) - y = py.sympy.S (char (x)); + y = py.sympy.S (sympy (x)); % Above is nice because it needs no imports. But downside is some % things like NonElementaryIntegral and MatrixElement will fail. See