Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
latot committed Jan 26, 2017
1 parent 38a19ad commit 9817c11
Show file tree
Hide file tree
Showing 16 changed files with 31 additions and 35 deletions.
2 changes: 1 addition & 1 deletion inst/@sym/contains.m
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
%% @group
%% a = interval (sym (0), 10);
%% contains (5, a)
%% @result{} ans = 1
%% @result{} ans = (sym) True
%% @end group
%% @end example
%%
Expand Down
8 changes: 4 additions & 4 deletions inst/@sym/imageset.m
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@
%% syms y
%% f = x^exp(y);
%% imageset (f, [x y], domain ('Naturals0'))
%% @result{} ans = (sym)
%% ⎧ ⎛ y⎞
%% ⎨ ⎝ℯ ⎠
%% ⎩x | x, y ∊ ℕ₀⎭
%% @result{} ans = (sym 1×2 matrix)
%% ⎧ ⎛ y⎞ ⎫ ⎧ ⎛ y⎞ ⎫⎤
%% ⎨ ⎝ℯ ⎠ ⎬ ⎨ ⎝ℯ ⎠ ⎬⎥
%% ⎩x | x ∊ ℕ₀⎭ ⎩x | y ∊ ℕ₀⎭
%% @end group
%% @end example
%%
Expand Down
4 changes: 2 additions & 2 deletions inst/@sym/iscomplement.m
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
%% a = domain ('Reals');
%% b = domain ('Complexes');
%% iscomplement (b - a)
%% @result{} ans = 1
%% @result{} ans = (sym) True
%% @end group
%% @end example
%%
Expand All @@ -45,4 +45,4 @@
%!test
%! a = domain ('Reals');
%! b = domain ('Integers');
%! assert (iscomplement (a - b))
%! assert (logical (iscomplement (a - b)))
2 changes: 1 addition & 1 deletion inst/@sym/isdisjoint.m
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
%% a = interval (sym (0), 10);
%% b = interval (sym (11), 15);
%% isdisjoint (a, b)
%% @result{} ans = 1
%% @result{} ans = (sym) True
%% @end group
%% @end example
%%
Expand Down
2 changes: 1 addition & 1 deletion inst/@sym/isemptyset.m
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
%% @example
%% @group
%% isemptyset (domain ('EmptySet'))
%% @result{} ans = 1
%% @result{} ans = (sym) True
%% @end group
%% @end example
%%
Expand Down
2 changes: 1 addition & 1 deletion inst/@sym/isintersection.m
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
%% a = interval (x, 1);
%% b = interval (sym (-1), 3);
%% isintersection (intersect (a, b))
%% @result{} ans = 1
%% @result{} ans = (sym) True
%% @end group
%% @end example
%%
Expand Down
4 changes: 2 additions & 2 deletions inst/@sym/isleftunbounded.m
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,15 @@
%% @group
%% a = interval (sym (-inf), 0);
%% isleftunbounded (a)
%% @result{} ans = 1
%% @result{} ans = (sym) True
%% @end group
%% @end example
%%
%% @example
%% @group
%% a = interval (sym (0), inf);
%% isleftunbounded (a)
%% @result{} ans = 0
%% @result{} ans = (sym) False
%% @end group
%% @end example
%%
Expand Down
2 changes: 1 addition & 1 deletion inst/@sym/ispropersubset.m
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
%% a = interval (sym (0), sym (1)/2);
%% b = interval(sym (0), 1);
%% ispropersubset (a, b)
%% @result{} ans = 1
%% @result{} ans = (sym) True
%% @end group
%% @end example
%%
Expand Down
2 changes: 1 addition & 1 deletion inst/@sym/ispropersuperset.m
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
%% a = interval (sym (0), 1);
%% b = interval (sym (0), sym (1)/2);
%% ispropersuperset (a, b)
%% @result{} ans = 1
%% @result{} ans = (sym) True
%% @end group
%% @end example
%%
Expand Down
4 changes: 2 additions & 2 deletions inst/@sym/isrightunbounded.m
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,14 @@
%% @group
%% a = interval (0, sym (inf));
%% isrightunbounded (a)
%% @result{} ans = 1
%% @result{} ans = (sym) True
%% @end group
%% @end example
%%
%% @group
%% a = interval (-inf, sym (0));
%% isrightunbounded (a)
%% @result{} ans = 1
%% @result{} ans = (sym) True
%% @end group
%% @end example
%%
Expand Down
2 changes: 1 addition & 1 deletion inst/@sym/issubset.m
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
%% a = interval (sym (0), sym (1)/2);
%% b = interval (sym (0), 1);
%% issubset (a, b)
%% @result{} ans = 1
%% @result{} ans = (sym) True
%% @end group
%% @end example
%%
Expand Down
2 changes: 1 addition & 1 deletion inst/@sym/issuperset.m
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
%% a = interval (sym (0), 1);
%% b = interval (sym (0), 1, true);
%% issuperset (a, b)
%% @result{} ans = 1
%% @result{} ans = (sym) True
%% @end group
%% @end example
%%
Expand Down
2 changes: 1 addition & 1 deletion inst/@sym/isuniversalset.m
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
%% @example
%% @group
%% isuniversalset (domain ('UniversalSet'))
%% @result{} ans = 1
%% @result{} ans = (sym) True
%% @end group
%% @end example
%%
Expand Down
2 changes: 1 addition & 1 deletion inst/@sym/point.m
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
%% space = interval (sym (0), 7) * interval (sym (4), 9);
%% p = point (sym (6), 7);
%% contains (p, space)
%% @result{} ans = 1
%% @result{} ans = (sym) True
%% @end group
%% @end example
%%
Expand Down
16 changes: 6 additions & 10 deletions inst/@sym/psets.m
Original file line number Diff line number Diff line change
Expand Up @@ -29,21 +29,17 @@
%% c = interval (sym (1), 7);
%%
%% psets (complexregion (a * b))
%% @result{} ans =
%% @{
%% (sym) [2, 3] × [4, 5]
%% @}
%% @result{} ans = (sym) [2, 3] × [4, 5]
%% @end group
%% @end example
%%
%% @example
%% @group
%% psets (complexregion (a * b + b * c))
%% @result{} ans =
%% @{
%% (sym) [2, 3] × [4, 5]
%% (sym) [4, 5] × [1, 7]
%% @}
%% @result{} ans = (sym 2×1 matrix)
%% ⎡[2, 3] × [4, 5]⎤
%% ⎢ ⎥
%% ⎣[4, 5] × [1, 7]⎦
%% @end group
%% @end example
%%
Expand All @@ -55,7 +51,7 @@
print_usage ();
end

out = elementwise_op ('lambda x: x.psets', sym (x));
out = python_cmd ('return Matrix(_ins[0].psets)', sym (x));

if nargout == 0 || nargout == 1
varargout = {out};
Expand Down
10 changes: 5 additions & 5 deletions inst/@sym/rangeset.m
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@
%% Example:
%% @example
%% @group
%% rangeset (sym (10), 0, -2) % doctest: +SKIP
%% @result{} ans = (sym) {10, 8, …, 2}
%% rangeset (sym (10), 0, -2)
%% @result{} ans = (sym) @{10, 8, …, 2@}
%% @end group
%% @end example
%%
Expand All @@ -57,12 +57,12 @@
%% Note, in Sympy 1.0 the negative steps produce a sorted
%% output, over 1.0 don't is sorted.

varargin = cellfun(@sym, varargin, 'UniformOutput', false);

if strcmp (varargin{nargin}, 'list')
y = python_cmd ('return list(Range(*_ins[:-1])),', varargin{:});
varargin = cellfun(@sym, varargin, 'UniformOutput', false);
y = python_cmd ('return list(Range(*_ins)),', varargin{1:3});
y = cell2sym (y);
else
varargin = cellfun(@sym, varargin, 'UniformOutput', false);
y = python_cmd ('return Range(*_ins),', varargin{:});
end

Expand Down

0 comments on commit 9817c11

Please sign in to comment.