octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #43513] when constructing a matrix from one ve


From: Gary
Subject: [Octave-bug-tracker] [bug #43513] when constructing a matrix from one vector of doubles and one vector of ints, octave silently casts the doubles to ints
Date: Sat, 01 Nov 2014 21:26:17 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/38.0.2125.111 Safari/537.36

URL:
  <http://savannah.gnu.org/bugs/?43513>

                 Summary: when constructing a matrix from one vector of
doubles and one vector of ints, octave silently casts the doubles to ints
                 Project: GNU Octave
            Submitted by: mi3gai4rui4
            Submitted on: Sat 01 Nov 2014 09:26:16 PM GMT
                Category: None
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: None
                  Status: None
             Assigned to: None
         Originator Name: garymm
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: 3.8.1
        Operating System: GNU/Linux

    _______________________________________________________

Details:

for example:
> doubles = [1.01; -0.01];
> ints = [int32(10); int32(0)];
> [doubles ints]
ans =
1 10
0 0

This is surprising behavior, and I can't find it documented anywhere.
Checked these pages:
https://www.gnu.org/software/octave/doc/interpreter/Integer-Data-Types.html
https://www.gnu.org/software/octave/doc/interpreter/Matrices.html#Matrices




    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?43513>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]