Skip to main content

Questions tagged [multidimensional-array]

Multidimensional-arrays can be described as multi-dimensional tables. Each index used in order to find a given element is called a dimension.

multidimensional-array
-1 votes
1 answer
36 views

Template parameters for c++ multidimentional array [duplicate]

Can someone explain how the following base template and specialization is instantiated to produce the correct result? I'm particularly unclear on how the <U[N]> template parameter is interpreted....
Rich Ramos's user avatar
0 votes
0 answers
46 views

Apply function with a vector as second argument

I have the following code, I wish you could explain me what the function apply with c(1,3) as second argument does. I completely understand the final result, I just don't understand how it works. The ...
fiodeno's user avatar
  • 97
0 votes
0 answers
25 views

Implementing Cell Overflow Handling in a 2D List with Python

This is a small part of a project where I'm having an issue. Suppose you are given the following: |-----|-----|-----|-----|-----| | -2 | 2 | -3 | 0 | 0 | |-----|-----|-----|-----|-----| | 0 ...
SSY's user avatar
  • 41
1 vote
1 answer
45 views

Filter multideminsional array in PHP so that if certain values are duplicated in sub-arrays the redundant ones are unset [closed]

In an application, redundant but non-identical arrays are being returned. I'd like to remove the redundant arrays from the multidimensional array. Though the issue could possibly be solved closer to ...
CK MacLeod's user avatar
  • 1,050
-1 votes
1 answer
27 views

Javascript exporting multi dimentioanl array results in some values to be empty

I am coding a practice react application in which I am exporting a primitive array with a separate file named data.js export const data = [ { type:"multiple", difficulty:"easy&...
Rivi's user avatar
  • 31
2 votes
0 answers
23 views

Printing 2D array in MIPS

I have been using a few other posts on here to try and figure out what I am doing wrong but I am stuck and could use some help. I am making a game that has an 8x8 "board" (2d array) similar ...
Sara Malos's user avatar
2 votes
2 answers
39 views

Dynamic dimensional array storing in Matlab

I have M many 2-D matrices of dimension (2 x n_1 ,2 x n_2 , 2 x n_3,..., 2 x n_N ). I can store them in a MATLAB cell-array of dim (2 x N x M) where N = {n_1 , n_2 , n_3,..., n_N} and n_1,n_2,n_3 are ...
zuko7's user avatar
  • 69
1 vote
1 answer
71 views

How do I effectively compute pairwise quantities in numpy?

I want to compute pairwise quantities, e.g. distances between two points. A simple example would be import numpy as np N = 9 x = np.linspace(0,1,N) y = np.abs(x - x[:,None]) # pairwise 1d eucdlidian ...
knods's user avatar
  • 23
3 votes
2 answers
58 views

Traverse over tree type structured data uing JavaScript

I have a data set having parent and nested children in it. The purpose of this data is to traverse over parent to -> child1 to-> Child1Child ..... -> child2 to -> child1 to -> child2 ...
vikas dhiman's user avatar
0 votes
0 answers
7 views

SemanticKITTI rotation troubles

The pose data provided with the SemanticKITTI (https://semantic-kitti.org/) LIDAR dataset is formatted unusually. For instance, they use a 'yzx' coordinate system instead of the standard 'xyz'. My ...
Tim Noel's user avatar
0 votes
2 answers
67 views

Why are all rows of my matrix the same as the last row?

Can someone please help me find fault in my code? If I create a blank 2D matrix with static initial value, it returns the correct transposed matrix. Whereas if I create a blank matrix using a for loop,...
Suyash Nachankar's user avatar
0 votes
1 answer
31 views

Create an LSTM Model based on multiple arrays events of random numbers

I need help on create a LSTM Model based on a complex structure of data. I have a multidimensional array. It is an array of over 4000 arrays, each one consists of six numbers (from 1 to 128). I have ...
Klode's user avatar
  • 373
2 votes
2 answers
115 views

Multidimensional C-array and std algorithms

I have the following use case: int data[Y][X]{}; // I hope to do the following things: int* begin = &data[0][0]; int* end = begin + Y * X; std::fill(begin, end, 1); std::all_of(begin, end, ...); ...
fir las's user avatar
  • 84
0 votes
0 answers
52 views

Interpolate y-value given x-value and data value in a 2D array

I am working with a 2D dataset with the x and y dimensions representing two separate variables, and the combined 2D grid representing a third variable. Here's a visual example of the dataset and the x ...
bashful_creature's user avatar
0 votes
0 answers
38 views

How do I dynamically allocate memory for a multidimentional array in C? [duplicate]

Dynamically allocate memory for a multidimensional array (matrix) with a specified number of rows and columns. How to allocate memory? How to allocate memory for 2D array? How to dynamically allocate ...
Samhitha Harini's user avatar

15 30 50 per page
1
2 3 4 5
2375