[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #57870] mod won't accept bools
From: |
anonymous |
Subject: |
[Octave-bug-tracker] [bug #57870] mod won't accept bools |
Date: |
Thu, 20 Feb 2020 23:10:24 -0500 (EST) |
User-agent: |
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:73.0) Gecko/20100101 Firefox/73.0 |
URL:
<https://savannah.gnu.org/bugs/?57870>
Summary: mod won't accept bools
Project: GNU Octave
Submitted by: None
Submitted on: Fri 21 Feb 2020 04:10:23 AM UTC
Category: None
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: None
Status: None
Assigned to: None
Originator Name:
Originator Email:
Open/Closed: Open
Release: 5.2.0
Discussion Lock: Any
Operating System: GNU/Linux
_______________________________________________________
Details:
I have some code that uses mod(arg,1) to check for non-integers. When arg is a
bool it errors out rather than just do it. MATLAB's mod accepts bool without
problem.
++
>> q=true(4)
q =
1 1 1 1
1 1 1 1
1 1 1 1
1 1 1 1
>> mod(q,1)
error: mod: wrong type argument 'bool matrix'
>> mod(double(q),1)
ans =
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
--
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?57870>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [Octave-bug-tracker] [bug #57870] mod won't accept bools,
anonymous <=