## numpy max vs amax vs maximum

numpy has three different functions which seem like they can be used for the same things — except that numpy.maximum can only be used element-wise, while numpy.max and numpy.amax can be used on particular axes, or all elements. Why is there more than just numpy.max? Is there some subtlety to this in performance? (Similarly for … Read more

## How to find all positions of the maximum value in a list?

I have a list: a = [32, 37, 28, 30, 37, 25, 27, 24, 35, 55, 23, 31, 55, 21, 40, 18, 50, 35, 41, 49, 37, 19, 40, 41, 31] max element is 55 (two elements on position 9 and 12) I need to find on which position(s) the maximum value is situated. Please, … Read more

## What is the maximum float in Python?

I think the maximum integer in python is available by calling sys.maxint. What is the maximum float or long in Python? 4 Answers 4

## CSS Div stretch 100% page height

I have a navigation bar on the left hand side of my page, and I want it to stretch to 100% of the page height. Not just the height of the viewport, but including the areas hidden until you scroll. I don’t want to use javascript to accomplish this. Can it be done in HTML/CSS? … Read more

## How might I find the largest number contained in a JavaScript array?

I have a simple JavaScript Array object containing a few numbers. [267, 306, 108] Is there a function that would find the largest number in this array? 32 Answers 32 Resig to the rescue: Array.max = function( array ){ return Math.max.apply( Math, array ); }; Warning: since the maximum number of arguments is as low … Read more

## How to scale down a range of numbers with a known min and max value

So I am trying to figure out how to take a range of numbers and scale the values down to fit a range. The reason for wanting to do this is that I am trying to draw ellipses in a java swing jpanel. I want the height and width of each ellipse to be in … Read more

## max value of integer

In C, the integer (for 32 bit machine) is 32 bits, and it ranges from -32,768 to +32,767. In Java, the integer(long) is also 32 bits, but ranges from -2,147,483,648 to +2,147,483,647. I do not understand how the range is different in Java, even though the number of bits is the same. Can someone explain … Read more

## How to perform .Max() on a property of all objects in a collection and return the object with maximum value [duplicate]

This question already has answers here: How to use LINQ to select object with minimum or maximum property value (19 answers) Closed 6 years ago. I have a list of objects that have two int properties. The list is the output of another linq query. The object: public class DimensionPair { public int Height { … Read more

## MIN and MAX in C

Where are MIN and MAX defined in C, if at all? What is the best way to implement these, as generically and type safely as possible? (Compiler extensions/builtins for mainstream compilers preferred.) 15 Answers 15

## Get the row(s) which have the max value in groups using groupby

How do I find all rows in a pandas DataFrame which have the max value for count column, after grouping by [‘Sp’,’Mt’] columns? Example 1: the following DataFrame, which I group by [‘Sp’,’Mt’]: Sp Mt Value count 0 MM1 S1 a **3** 1 MM1 S1 n 2 2 MM1 S3 cb **5** 3 MM2 S3 … Read more