Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • D D2O
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 22
    • Issues 22
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • ift
  • D2O
  • Issues
  • #9
Closed
Open
Issue created Feb 25, 2016 by Theo Steininger@theosContributor

Semi-advanced indexing is not recognized

a = np.arange(24).reshape((3, 4,2))
obj = distributed_data_object(a)

Semi-advanced indexing

a[(2,1,1),1]

yields

array([[18, 19],
   [10, 11],
   [10, 11]])

The ``indexinglist'' scheme in d2o expects either scalars or numpy arrays as tuple elements and therefore:

obj[(2,1,1),1] -> AttributeError                            

However,

obj[np.array((2,1,1)), 1] works.

Solution: Parse the elements and in doubt cast them to numpy arrays.

Assignee
Assign to
Time tracking