About 25,400,000 results
Open links in new tab
  1. What does the Array method `reduce` do? - Stack Overflow

    Reduce function does not reduce anything. Reduce is the function to take all the elements of an array and come out with a single value out of an array.

  2. Using reduce() to find min and max values? - Stack Overflow

    57 I have this code for a class where I'm supposed to use the reduce() method to find the min and max values in an array. However, we are required to use only a single call to reduce. The return array …

  3. arrays - Javascript reduce () on Object - Stack Overflow

    4 An object can be turned into an array with: Object.entries (), Object.keys (), Object.values (), and then be reduced as array. But you can also reduce an object without creating the intermediate array. I've …

  4. How to call reduce on an array of objects to sum their properties?

    You can use reduce method as bellow; If you change the 0 (zero) to 1 or other numbers, it will add it to total number. For example, this example gives the total number as 31 however if we change 0 to 1, …

  5. JavaScript array .reduce with async/await - Stack Overflow

    How to safely use async reduce That being said, using a reducer this way does mean that you need to guarantee it does not throw, else you will get "unhandled promise rejections". It's perfectly possible to …

  6. c# - Map and Reduce in .NET - Stack Overflow

    What scenarios would warrant the use of the "Map and Reduce" algorithm? Is there a .NET implementation of this algorithm?

  7. Why is a combiner needed for reduce method that converts type in …

    I wanted to do a map-reduce. I wanted Stream's "reduce" method to have an overloaded version that allows mapping to a different type than the input type, but does not force me to write a combiner. As …

  8. What is the difference between np.mean and tf.reduce_mean?

    One important difference for those new to tensorflow: tf.reduce_mean is multi-threaded, typically calculated on your GPU, whereas np.mean is calculated on a single CPU.

  9. r - ggplot2 : How to reduce the width AND the space between bars …

    I understand that one can change the width of a bar in geom_bar using the width argument. That does work, but then it creates a larger gap between the bars. Is there a way to manually push the bars

  10. python - reducing number of plot ticks - Stack Overflow

    250 I have too many ticks on my graph and they are running into each other. How can I reduce the number of ticks? For example, I have ticks: