Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7556459
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T11:51:46+00:00 2026-05-30T11:51:46+00:00

Good evening, I am trying to generalize the histogram filter localization to discrete environments

  • 0

Good evening,

I am trying to generalize the histogram filter localization to discrete environments of arbitrary dimensionality. Even though at this point working with numpy would probably be the best choice, I would like to stick to certain constraints of an assignment which itself got me started with this whole 2D- to higher-dimensional-capability thing.

For a start, I chose a cubic environment (each segment labelled from 1 to 27):

debug = [[['1', '2', '3'],
          ['4', '5', '6'],
          ['7', '8', '9']],
         [['10', '11', '12'],
          ['13', '14', '15'],
          ['16', '17', '18']],
         [['19', '20', '21'],
          ['22', '23', '24'],
          ['25', '26', '27']]]

During histogram localization a robot first moves and subsequently measures an input which helps gathering information about where the robot itself is residing. In my limited discrete 3D-cube-environment, my robot can fly up/down, move left/right and go forward/backward. Each time I need to perform an update alongside the robots movement direction (i.e. alter probability of residing in a certain segment).

Moving Forward/Backward would mean altering the rows {1,10,19},{2,11,20},{3,12,21},… and so on, while going left/right would mean altering the rows {1,2,3},{4,5,6},{7,8,9},… Ultimately, going up and down would mean altering {1,4,7},…
So this is where I am, with relatively limited basic python knowledge, I found myself in struggle with generalizing from 2- to 3D – however would even like it to work for higher dimensional environments. Any ideas on what to do next? Are there fancy ways to transform given lists of lists such that updates as described previously would become a straightforward task (if they are not already)?

Thanks everyone!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T11:51:47+00:00Added an answer on May 30, 2026 at 11:51 am

    Don’t use a list of lists, using a numpy.ndarray will make things much easier for the fancy indexing/slicing/transformations you need.

    >>> import numpy as np
    >>> x = np.array(range(1, 28)).reshape((3, 3, 3))
    >>> x
    array([[[ 1,  2,  3],
            [ 4,  5,  6],
            [ 7,  8,  9]],
    
           [[10, 11, 12],
            [13, 14, 15],
            [16, 17, 18]],
    
           [[19, 20, 21],
            [22, 23, 24],
            [25, 26, 27]]])
    >>> x[:,0,0]
    array([ 1, 10, 19])
    >>> x[0,:,0]
    array([1, 4, 7])
    >>> x[0,0,:]
    array([1, 2, 3])
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Good evening, I have been trying to wrap my head about this, below, code
Good morning, afternoon, evening or night (depending on your timezone). This is just a
Good evening guys, I'm trying to pass multiple checkbox values through AJAX and process
Hi and good evening, hope someone can help. I am trying to get some
Good evening fellow coders, and thank you in advance for any help/attention. This is
Good evening. For a project, I have to create a system. In this system,
Good evening StackOverflow This time I'm fighting with a ListView Containing TextViews. I add
Good evening, In a test JSF 2.0 web app, I am trying to get
Good evening, I am having a weird issue with a method I am trying
Good Evening, I'm building a website which will will look something like this: So

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.