Pythonic (Questions about the bugs and the needed features)

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Pythonic (Questions about the bugs and the needed features)

Nader Nabil
1-  
Element indexing on a list or other sequence object with a range or set of indices doesn't return the right number of output arguments.

code :

x = py.list ({1, 2, 3, 4, 5, 6});
x{1:3}
y = {x{1:3}};

current output : 
y =
{
  [1,1] =
  {
    [1,1] =  1
    [1,2] =  2
    [1,3] =  3
  }
}

 Is this the correct wanted output : 
y = [1.0 , 2.0 , 3.0]  ?
i don't understand what is the problem here . 

2 - Operate on Python objects using standard Octave arithmetic and logical operators

What python objects specifically is meant ? 
List ? , so this means that i can do (list1 == list2) ? , or list1 + list2 ?? 

3- Load and save Python objects to Octave data files using the standard load/save commands

bug #45833

what is the steps to reproduce that bug  , i need an example 
and another example for load and save commands that works
correctly with normal octave objects.


Reply | Threaded
Open this post in threaded view
|

Re: Pythonic (Questions about the bugs and the needed features)

Doug Stewart-4


On Mon, Mar 23, 2020 at 9:22 AM Nader Nabil <[hidden email]> wrote:
1-  
Element indexing on a list or other sequence object with a range or set of indices doesn't return the right number of output arguments.

code :

x = py.list ({1, 2, 3, 4, 5, 6});
x{1:3}
y = {x{1:3}};

current output : 
y =
{
  [1,1] =
  {
    [1,1] =  1
    [1,2] =  2
    [1,3] =  3
  }
}

 Is this the correct wanted output : 
y = [1.0 , 2.0 , 3.0]  ?
i don't understand what is the problem here . 
try
q=cell2mat([x{1:3}])


 

2 - Operate on Python objects using standard Octave arithmetic and logical operators

What python objects specifically is meant ? 
List ? , so this means that i can do (list1 == list2) ? , or list1 + list2 ?? 

3- Load and save Python objects to Octave data files using the standard load/save commands

bug #45833

what is the steps to reproduce that bug  , i need an example 
and another example for load and save commands that works
correctly with normal octave objects.




--
DASCertificate for 206392

Reply | Threaded
Open this post in threaded view
|

Re: Pythonic (Questions about the bugs and the needed features)

Colin Macdonald-2
In reply to this post by Nader Nabil
On 2020-03-23 6:21 a.m., Nader Nabil wrote:
> 3- Load and save Python objects to Octave data files using the standard
> load/save commands
>
> bug #45833 <https://savannah.gnu.org/bugs/?45833>
>
> what is the steps to reproduce that bug  , i need an example
> and another example for load and save commands that works
> correctly with normal octave objects.

"help save" and "help load" should have the examples you're looking for.

I think this bug should be self-explanatory: I suggest *you* try to come
up with the examples you need.

Colin



Reply | Threaded
Open this post in threaded view
|

Re: Pythonic (Questions about the bugs and the needed features)

Nader Nabil
Thanks, I'll check them out. 

On Mon, Mar 23, 2020 at 5:15 PM Colin Macdonald <[hidden email]> wrote:
On 2020-03-23 6:21 a.m., Nader Nabil wrote:
> 3- Load and save Python objects to Octave data files using the standard
> load/save commands
>
> bug #45833 <https://savannah.gnu.org/bugs/?45833>
>
> what is the steps to reproduce that bug  , i need an example
> and another example for load and save commands that works
> correctly with normal octave objects.

"help save" and "help load" should have the examples you're looking for.

I think this bug should be self-explanatory: I suggest *you* try to come
up with the examples you need.

Colin