3

This piece of code is written in Python by using Cython to declare a multidimensional array:

cdef int[:, ::1] result_operation_2d_array = np.copy(solution.operation_2d_array)

but what do : and :: mean here?

Ivan
  • 34,531
  • 8
  • 55
  • 100
  • Does this answer your question? [What is :: (double colon) in Python when subscripting sequences?](https://stackoverflow.com/questions/3453085/what-is-double-colon-in-python-when-subscripting-sequences) – August Karlstrom Feb 01 '21 at 10:01
  • 2
    This should come in useful: https://cython.readthedocs.io/en/latest/src/userguide/memoryviews.html – Ivan Feb 01 '21 at 10:03
  • 1
    @AugustKarlstrom it doesn't answer the question. This is fairly Cython-specific syntax. (I'm not sure how much value there is in answering the question given it's fairly well covered in the documentation, but it isn't a duplicate) – DavidW Feb 01 '21 at 10:18
  • 1
    more precise: https://cython.readthedocs.io/en/latest/src/userguide/memoryviews.html#c-and-fortran-contiguous-memoryviews – ead Feb 01 '21 at 10:44
  • @Ivan thanks. somehow I missed the article when I read about Cython. – Fighter Steady Feb 02 '21 at 08:03

0 Answers0