Category "arrays"

Sort an Array of objects on the basis of value of array inside object [duplicate]

I am looking for better approach to sort an array of objects on the basis of array elements inside the object. I have an array of objects to b

Forming a 3D np array from a 2D array

Let's say I have a 2D array: L = np.array([[1,2,3], [4,5,6], [7,8,9]]) I would like to make a 3D array from this, using a parameter

Assigning to a double-indexed numpy array

I know that when assigning to a double indexed-array gives bad results because you're assigning to a view rather then to an array directly, but I cannot figure

How to traverse memory for the Fibonacci sequence in ARM assembly

I must write the following function in its own assembly file: void fillFibonacciArray(int *array, int n); The function writes into the array the first n Fibonac

How to know when a char* library function arg needs an array it can modify, not a char pointer

I am new to C programming. and I know char * and char[] array are different. Yet, you can deduct the char[] to char * when it comes to a function param. So func

Remove the values from array1 by referring to array2

I have two arrays and I want to remove the values from array1 by referring to array2. The expected result is ["b", "c",]; array1 = ["aa", "bb", "b", "c",]; ar

How can I access and process nested objects, arrays or JSON?

I have a nested data structure containing objects and arrays. How can I extract the information, i.e. access a specific or multiple values (or keys)? For examp

how to parse yaml file that contains dictionary and structure at multiple levels in C++

I am trying to parse a yaml file that likes like below in C++: test_case_0: - input: a: 10 b: 5 - output: area: 50 delta: 5 test_case_1: - input

How to group subarrays by a column value?

I have the following array Array ( [0] => Array ( [id] => 96 [shipping_no] => 212755-1 [part_no] =>

building a nested JSON

Some data files that I need to read / parse have headers in the style: level0var = value0 level0var.level1field = value1 level0var.level1array[11].level2field

Parse/Display nested JSON array with Jquery

I am looking to pull data from a job board API. I'd like to have headings for the departments (pulled from JSON level 1) and under each department the current o

How can an object reference in java hold the reference to a primitive double dimensional int array [duplicate]

I have a piece of code- public class Sudoku { static int[][] game; public static void main(String[] args) { int [][] games= n

Why is this 2D array filtering not working?

I have this 2D array and I'm trying to filter it, but it's coming out unfiltered: Data: [ ["Val #","Val #","Val #","Val #","Val #"], ["SO-000379-001A-047-1","

Solidity - Send array of tuple data with address and amount

I'm working on a Solidity Smart Contract for Tron Network. I want the owner can set an array of address => uint. This is the code: pragma solidity ^0.8.0; s

Error: " 'float' object is not subscriptable" whenever I try to print certain values from a list of averafes

I created two variables that give the amount of words in a given context that are both positive and negative respectively within a couple of years. The followin

Data Formulation

I am hoping to get some help formulating an array to more concisely view my data coming in from a google form. Is this something someone can help me with? I'm s

ValueError: shapes and not aligned: (dim 2) != 4 (dim 0)

I am currently working on a script that does some array manipulating and calculations for modeling. I am running into an error and unsure how to solve it. from

Remove and insert element to a specified indices in Numpy array

Suppose I have a numpy array from which I want to remove a specific element. # data = np.array([ 97 32 98 32 99 32 100 32 101]) # collect indices where th

API URL Query to filter the response

So I'm trying to filter the response of my API GET query and can't seem to find a way to access deep enough in Json. My response is like: { "orders": [

Unable to map nested array data in JavaScript?

Here, I have nested array object categories which have nested array objectproduct. product contains name, price, discount, unitsold properties with images array