Questions tagged [n-dimensional]

n-dimensional involves computation in higher dimensions

Usually used in math,physics,machine learning and computer graphics. Its common to downgrade n-dimensional problems down to 4D/3D/2D/1D using techniques like:

  • projection
  • cross-section
  • PCA

either to lower the needed processing or storage power needed to handle it or to visualize or just to simplify.

110 questions
2
votes
2 answers

how to define n-dimensional vector rotation and reflection in haskell?

How do I define vector rotation and reflection in general where the function would work in n dimensions in Haskell? Currently I have the dot product, normalization and projection done but stuck on reflection and rotation. data Vector s a = Vector…
SANK
  • 56
  • 6
2
votes
1 answer

Dimensions of fractals: boxing count, hausdorff, packing in R^n space

I would like to calculate dimensions of fractal written as a n-dimensional array of 0s and 1s. It includes boxing count, hausdorff and packing dimension. I have only idea how to code boxing count dimensions (just counting 1's in n-dimensional matrix…
kzz
  • 33
  • 1
  • 9
2
votes
2 answers

Jquery inArray method not working in multidimensional array

I'm trying to create a function to stop the creation of duplicate sub arrays in an array using Jquery's inArray function but it doesnt seem to work. Maybe i am missing something in my code? function createProduct() { var name =…
Mordred
  • 185
  • 2
  • 15
2
votes
2 answers

6- or more dimensional Arrays in Scala

I was looking into multi-dimensional Arrays in Scala and came across some easy ways to create multi-dimensional Arrays. Namely: val my3DimensionalArray = Array.ofDim[Int](3,4,5) //array with dimensions 3 x 4 x 5 Or even val myFilledArray =…
Josh Lemer
  • 446
  • 3
  • 18
2
votes
4 answers

Generate n-dimensional random numbers in Python

I'm trying to generate random numbers from a gaussian distribution. Python has the very useful random.gauss() method, but this is only a one-dimensional random variable. How could I programmatically generate random numbers from this distribution in…
Magsol
  • 4,640
  • 11
  • 46
  • 68
1
vote
2 answers

n-dimensional traverse

I'm implementing the longest common subsequence for n dimensions. Current problem: how do I traverse the n strings? Simply nesting for loops won't work anymore, because I need n of them. What's the nice solution for that problem? Loops + recursion,…
Reactormonk
  • 21,472
  • 14
  • 74
  • 123
1
vote
0 answers

xarray .where() function is too slow over datasets

I am using .where() function to select time and certain criteria in xarray dataset. import numpy as np import xarray as xr ds1 = xr.open_dataset('COD.nc') ds2 = xr.open_dataset('CDNC.nc') ds3 = xr.open_dataset('LWP.nc') ds4 =…
1
vote
1 answer

Construct n-dimensional boost point

Problem: boost/geometry/geometries/point.hpp point template does not provide a way to construct an n-dimensional point type with non-zero values. For example: #include namespace bg =…
1
vote
2 answers

Error: System.Data.Linq.Binary' cannot be converted to '1-dimensional array of Byte'

I am trying to return a binary from the DB using linq for display in the browser. The method below using ado.net works but I am trying to ypgrade to linq but the linq version returned the error. Public Sub ProcessRequest(ByVal context As…
ruffone
  • 103
  • 2
  • 7
1
vote
0 answers

Find optimal paramters for target value in pandas dataframe

I have some code that takes parameters x1, x2... xn and outputs the value y. I want to find the parameters that maximize y. I picked randomly the parameters 1000 times, calculated the target value and wrote the data to pandas dataframe. So my…
e271p314
  • 3,841
  • 7
  • 36
  • 61
1
vote
1 answer

How to generate non-overlapping random points uniformly and evenly within N-dimensional spaces or dataset between low and high range

I have tried to find random points on the NxM dataset based on the lowest value of each M as low range and the highest value of each M on as high range. Here is the code: def generate_random_points(dataset, dimension_based=False): dimension =…
1
vote
1 answer

Generate N points as far as possible from each other on a D dimension hypersphere

I'm trying to write code to generate N points as far as possible from each other on a D dimensional hypersphere. The method I have so far is to take the number of points and hope it's less than D or 2*D, which it usually will be. Then I create N…
user12314098
1
vote
1 answer

Centroid of N-Dimension dataset

As I am new in python and in programming in general, my teacher gave me some work. Some of it is to work with the MNIST database of handwritten numbers. Each of the numbers is a vector of 728 components. The problem comes when I want to compute the…
1
vote
2 answers

Couple elements in numpy array

I have 1-dimensional numpy array (arr0) with different values. I want to create a new array of elements, where each element is a couple (indexes and/or values) of one element to its closest one, considering that the absolute value of the difference…
Sav
  • 142
  • 1
  • 17
1
vote
1 answer

GPU Array multiplications using Pycuda on Numpy arrays

I have tried to implement Element-wise multiplication of two numpy arrays by making similar GPU arrays and performing the operations. However, the resulting execution time is much slower than the original numpy pointwise multiplication. I was hoping…