Skip to content

Commit 420145f

Browse files
committed
simplify
1 parent c48c6fe commit 420145f

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

+stdlib/+python/get_owner.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
if ~strlength(file), return, end
66

77
try %#ok<TRYNC>
8-
n = string(py.str(py.pathlib.Path(file).owner()));
8+
n = string(py.pathlib.Path(file).owner());
99
end
1010

1111
end

+stdlib/+python/is_char_device.m

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,5 @@
33
try
44
y = py.pathlib.Path(p).is_char_device();
55
catch e
6-
warning(e.identifier, "Python is_char_device failed: %s", e.message);
7-
y = false;
6+
y = logical.empty;
87
end

+stdlib/+python/is_symlink.m

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@
33
try
44
y = py.pathlib.Path(p).is_symlink();
55
catch e
6-
warning(e.identifier, "Python is_symlink failed: %s", e.message);
7-
y = false;
6+
y = logical.empty;
87
end
98

109
end

+stdlib/parent.m

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
%% Examples:
1010
% stdlib.parent("a/b/c") == "a/b"
1111
% stdlib.parent("a/b/c/") == "a/b"
12+
%% Benchmark
13+
% Java or Python are each about 2-4x faster than native Matlab
1214

1315
function [par, b] = parent(file, backend)
1416
arguments

0 commit comments

Comments
 (0)