rust-ndarray / ndarray

ndarray: an N-dimensional array with array views, multidimensional slicing, and efficient operations
https://docs.rs/ndarray/
Apache License 2.0
3.56k stars 299 forks source link

Is there a problem trying to create a concatenate that returns an Arrayview? #1338

Closed SilmaliTech closed 10 months ago

SilmaliTech commented 10 months ago
  1. I created a concatenate function that returns an arrayview.
  2. There are ndarrays a, b with contiguous memory layout.
  3. If I concatenate a and b, will I create an arrayview with two contiguous memory layouts?
  4. Is this a bad use?

I used to think this because of my computer's memory issues, but I've learned that most of the time, my thoughts aren't good...Is this a bad idea..?

nilgoyette commented 10 months ago

Are you saying that you created that function and it worked fine? Because I don't think it's possible to create an ArrayView from the concatenation of other arrays. You can use the concatenate macro to create an owned array, but a view... I doubt it.

SilmaliTech commented 10 months ago

Are you saying that you created that function and it worked fine? Because I don't think it's possible to create an ArrayView from the concatenation of other arrays. You can use the concatenate macro to create an owned array, but a view... I doubt it.

As expected, there was something strange.... This was a plan, and the meaning seems to have been strangely conveyed using a translator.