About 81 results
Open links in new tab
  1. correct and efficient way to flatten array in numpy in python?

    46 You might need to check out numpy.flatten and numpy.ravel, both return a 1-d array from an n-d array. Furthermore, if you're not going to modify the returned 1-d array, I suggest you use …

  2. python - Flattening a list of NumPy arrays? - Stack Overflow

    Nov 15, 2015 · Here flatten demonstrates piecewise linear complexity which can be reasonably explained by it making a copy of the initial array compare to constant complexities of ravel and …

  3. How to 'Flatten' in Adobe Acrobat Pro DC | Community

    We recently purchased Adobe Acrobat Pro DC and I'm trying to figure out how to take a document that I added a stamp to and flatten it so our users cannot delete the stamp from it.  I have found the …

  4. What is the role of "Flatten" in Keras? - Stack Overflow

    The role of the Flatten layer in Keras is super simple: A flatten operation on a tensor reshapes the tensor to have the shape that is equal to the number of elements contained in tensor non including the …

  5. How to flatten nested array in javascript? - Stack Overflow

    Dec 3, 2014 · Conclusion: To flatten an arbitrarily nested array in a functional way we just need a one-liner: const flatten = f => traverse(f) (concat) ([]);. All other involved functions are generic and have a …

  6. How do I make a flat list out of a list of lists? - Stack Overflow

    If your list of lists comes from a nested list comprehension, the problem can be solved more simply/directly by fixing the comprehension; please see How can I get a flat result from a list …

  7. How does the Flatten layer work in Keras? - Stack Overflow

    A Flatten layer in Keras reshapes the tensor to have a shape that is equal to the number of elements contained in the tensor. This is the same thing as making a 1d-array of elements.

  8. python - Flatten an irregular (arbitrarily nested) list of lists ...

    Feb 27, 2015 · 33 This version of flatten avoids python's recursion limit (and thus works with arbitrarily deep, nested iterables). It is a generator which can handle strings and arbitrary iterables (even …

  9. python - Flatten numpy array - Stack Overflow

    Jul 6, 2012 · 31 Is there a simple way in NumPy to flatten type object array? I know .flatten () method flattens non-object type arrays constructed from same size arrays:

  10. python - Understanding torch.nn.Flatten - Stack Overflow

    May 9, 2021 · It is a difference in the default behaviour. torch.flatten flattens all dimensions by default, while torch.nn.Flatten flattens all dimensions starting from the second dimension (index 1) by default.