Created an array using: which looks like this: Now want to update any one cell of this 2d array with any value like: It is updating whole col ...

How to assign value in one cell in 2D array in Javascript

Created an array using: which looks like this: Now want to update any one cell of this 2d array with any value like: It is updating whole col ...

What is the right way to change a set of values on every row in a 2D array?

I have a 2D array 'A' with the shape (1015, 1200). Variable L1 has the lower indices and L2 has higher indices. On every one of the 1015 rows in A, I ...

conditional filter in array using javascript

I have two arrays and first array are having keys and want to check that all keys are having second array with value true. and return that true value ...

Using functions to lesser repetitiveness

I have been working on this problem for a while now: basically I need to put the for loop in a function so I can call for it, but I don't how to to ma ...

Pandas dataframe from numpy array with multiindex

I'm working with a numpy array called array_test with shape (5, 359, 2). This is checked with array_test.shape. The array reflects mean and uncertaint ...

How to combine two image arrays into one RGB

I am working on a dataset that has two features, real and imaginary impedances. I applied data-to-image conversion using MTF in order to represent eac ...

Array merge or combine by same key of two associative arrays?

I have this situation: $array = [ "name" => [ "ro" => [ 0 => "Nume Romana", ], "en" => [ ...

Iterating over a multilevel array

I have an array of values that can be cycled through using the next/prev buttons: Example: Tell me please how to iterate over if the array is mult ...

Iterating and searching for element in n-dimensional nested array

here is an array presented I am trying to search an element based upon the id value, and remove it from the array and replace it with empty array ...

How to fill a 2D array with a result from division of 2 random numbers in 2 different ranges but the result being in certain range?

I need to fill a 2D array with result from division of 2 random numbers in 2 different ranges but the result can't be in range (-2,2). Ranges of two r ...

multiApply function for loop on a 3D array

I am trying to make my data processing more efficient for a spatial temperature data project. I have a for loop that will do what I want, but it is mu ...

2D Array Row Sum

I have a 2D array in python and I'm trying to add the values in the rows, but I only get the sum from the last 1D array. code: expected result: ...

How to find 2x3 pattern in matrix Java

This algorithm has me stumped. I'm pretty novice to data structures and alogithms, I understand what the code needs to do, but can't wrap my brain on ...

How to match 2 two multi-dimensional list or array

I am having a bit of trouble finding a code to match 2 two multi-dimensional list or array over 21 rows. For example a1 to find a match in b1 and retu ...

Pathfind to edge / find hole algorithm?

I'm looking for an algorithm that can search a 3D array and figure out the quickest way to pathfind from a single point to any edge of the array. More ...

C++ 2d array row swap

Don't know if it matter but for the problem I use rand() to fill a 2d array with elements and CodeBloks for IDE. I've been learning C++ and have gott ...

Turn raster files (4-dimensional) into structure that allows to conduct a random forest classification

My goal is to conduct a random forest classification for agricultural landuse forms (crop classification). I have several ground truth points for all ...

codeigniter 3.11 global variable array in constants.php

How can i declare a global array in constants.php? I want use an array of this form in a helper file. What is the better way? Thank you!! I see ...

cpp static template-dimension pass-as-reference when leading dimension may be zero

I have the following function. template<int m, int n> void foo(float (&A)[m][n]){} int main(){ float x[3][4], y[0][4]; foo< ...

Group rows of data by column value then store nested data, first and last occurrences, and counts within each group

I am trying to split an array of space-delimited strings, group by a particular column, then store the data within each group in a more convenient str ...

Sorted:

Quality: