Skip to main content
Filter by
Sorted by
Tagged with
-1 votes
1 answer
54 views

Basically what im trying to do is export np.arrays to a .csv file where my data can be stored neatly. I've tried doing this code, but it doesn't work as i would like to. import numpy as np import ...
felipe's user avatar
  • 65
2 votes
1 answer
75 views

I'm currently trying to bridge Numo::NArray and FFI, so that an FFI Pointer can access the raw data in a Numo::NArray without having to copy data through String like I do now (thus causing GC churn ...
nitrogen's user avatar
  • 1,707
0 votes
1 answer
46 views

So basically RubyNumberTheory require the NArray gem, and it seems it requires some native compilation tools and probably some additional configuration. So on a Fedora 29, here is what was tried $ ...
psychoslave's user avatar
  • 3,131
1 vote
1 answer
258 views

Multidimensional Matrix array is like this arr1 = Matrix[[0.9742006046104146, 0.9164380106962612, 0.39571440216724874], [1.3793903493310324, 1.8988033906016721, 1.2768961254764901], ...
arjun's user avatar
  • 1,624
2 votes
1 answer
453 views

I'm trying to install the NArray gem for Ruby to do some math functions. I'm running Ruby version 2.0.0p353 [x64-mingw32] on Windows with gem 2.014 When I attempt to install the NArray gem, it ...
DBelge's user avatar
  • 21
2 votes
2 answers
312 views

Is there an efficient way to create an RMagick image from the data in a 2D NArray (a Ruby class that's supposed to be more efficient than regular arrays), or are the two libraries just incompatible in ...
user2055867's user avatar
1 vote
2 answers
177 views

I am creating input to ruby-fann, doing as much manipulation in narray as I can for performance reasons. Typically I am manipulating 2D 200x200 arrays of floats, and need to repeat processing many ...
Neil Slater's user avatar
  • 27.4k
0 votes
1 answer
515 views

Knowing the multidimensional-array's shape of a vector, how can we convert it into a new vector of one dimension (by flatten the multidimensional-array)? For example considering the following array: ...
T5i's user avatar
  • 1,530
1 vote
1 answer
147 views

If I have a Narray with the shape 100, 10000 and want to expand it to say 100, 20000 (basically add rows) what is the proper way to achieve this? To expand massive Narrays I would like to avoid using ...
maasha's user avatar
  • 2,004
2 votes
2 answers
147 views

I am looking for a way to replace all occurrences of 'A' with 1, 'T' with 2, 'C' with 8, and 'G' with 16 in a byte array. How can this be done?
maasha's user avatar
  • 2,004
1 vote
1 answer
71 views

I am interested in locating all non-empty intervals in a NArray as tuples of [begin, end] type. So if we have a NArray of a given size and all values at index positions 100 ... 200, 300 ... 400, etc ...
maasha's user avatar
  • 2,004