![]() ![]() ![]() In Fortran, = serves as an assignment operator: X = 2 sets the value of X to 2. The first important computer programming language to use the equal sign was the original version of Fortran, FORTRAN I, designed in 1954 and implemented in 1957. ), or to express a universal equivalence ( (x + 1)² = x² + 2x + 1). In mathematics, the equal sign can be used as a simple statement of fact in a specific case ( x = 2), or to create definitions ( let x = 2), conditional statements ( if x = 2, then. Usage in mathematics and computer programming The symbol || was used by some and æ (or œ), from the Latin word aequalis meaning equal, was widely used into the 1700s" ( History of Mathematics, University of St Andrews). "The symbol = was not immediately popular. ![]() You are receiving this because you commented.- And to avoid the tedious repetition of these words: "is equal to" I will set as I do often in work use, a pair of parallels, or duplicate lines of one length, thus: =, because no 2 things can be more equal. Having an inconsistent behaviour and leaving `None` being as such but comparing them as different violates the principle of least astonishment. * pandas coverts all missing values *except for* ´None´ to NaN,* pandas (according to IEEE) treats NaN as different from themselves. ![]() Here NumPy is consistent with the vectorization in `In`. Now, if I turn the series to `numpy.array`s as in `In` I got the expected result. Currently they turn out not to be! But if I do test equality member by member as in `In` instead I get (as expected) that the series are equal *member by member*. I expect that `In ` should tell me if the two series are equal *member by member*, vectorizing in some sense the equality. In : all(lambda a, b: a = b for a, b in zip(A.values, B.values)) In : all(lambda a, b: a = b for a, b in zip(A, B)) This benefit is lost if youĬhange the way equality works for *some* of the Python types (like None)! Keep their Python types because they want the objects they put in the I think that people finds useful to not immediately convert to NaN and On Fri, at 6:23 AM, Massimo Santini wrote: I don't think anyone can really think that an inconsistent behaviour is a good thing… I spent quite some time (with two dataframes of tens of thousands of elements of different dtypes) to get why there was a difference when, looking at the corresponding rows, all the values where equal! Having an inconsistent behaviour and leaving None being as such but comparing them as different violates the principle of least astonishment.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |