esa / esa/pygmo2

Archipelago slices

Open
#5 7 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
C++
Stars
536
Forks
74
PR merge metrics
No merged PRs in 30d

Description

Currently, an archipelago object allows to access its islands by indexing:

> `archi[1]`
> Island name: Multiprocessing island
> Status: idle
> ...

Looping like `for isl in archi` is supported as well. However, accessing islands via slicing throws an error:

> for isl in archi[0:3]:
> pass
>
> ArgumentError Traceback (most recent call last)
> in
> ----> 1 for isl in archi[0:3]:
> 2 pass
>
> ArgumentError: Python argument types in
> archipelago.__getitem__(archipelago, slice)
> did not match C++ signature:
> __getitem__(pagmo::archipelago {lvalue}, unsigned long)

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.