NumPy Logic functions: less() function - w3resource

文章推薦指數: 80 %
投票人數:10人

The less() function is used to return the truth value of (x1 < x2) element-wise. ... Returns: out : ndarray or scalar - Output array, element-wise ... home FrontEnd HTML CSS JavaScript HTML5 Schema.org php.js TwitterBootstrap ResponsiveWebDesigntutorial ZurbFoundation3tutorials PureCSS HTML5Canvas JavaScriptCourse Icon Angular Vue Jest Mocha NPM Yarn BackEnd PHP Python Java Node.js Ruby Cprogramming PHPComposer Laravel PHPUnit Database SQL(2003standardofANSI) MySQL PostgreSQL SQLite NoSQL MongoDB Oracle Redis ApolloGraphQL API GooglePlusAPI YoutubeAPI GoogleMapsAPI FlickrAPI Last.fmAPI TwitterRESTAPI DataInterchnage XML JSON Ajax Exercises HTMLCSSExercises JavaScriptExercises jQueryExercises jQuery-UIExercises CoffeeScriptExercises PHPExercises PythonExercises CProgrammingExercises C#SharpExercises JavaExercises SQLExercises OracleExercises MySQLExercises SQLiteExercises PostgreSQLExercises MongoDBExercises TwitterBootstrapExamples Others ExcelTutorials Usefultools GoogleDocsFormsTemplates GoogleDocsSlidePresentations NumberConversions LinuxTutorials Quizzes Articles HomePythonHomeNumPyHome▼NumPyLogicfunctionsroutinesNumPyLogicfunctionsHome▼Truthvaluetestingall()any()▼Arraycontentsisfinite()isinf()isnan()isnat()isneginf()isposinf()▼Arraytypetestingiscomplex()iscomplexobj()isfortran()isreal()isrealobj()isscalar()▼Logicaloperationslogical_and()logical_or()logical_not()logical_xor()▼Comparisonallclose()isclose()array_equal()array_equiv()greater()greater_equal()less()less_equal()equal()not_equal() NumPyLogicfunctions:less()function LastupdateonMay28202211:19:31(UTC/GMT+8hours) numpy.less()function Theless()functionisusedtoreturnthetruthvalueof(x1 Version:1.15.0 Parameter: Name Description Required/ Optional x1,x2 Inputarrays.Ifx1.shape!=x2.shape,theymustbebroadcastabletoacommonshape (whichmaybetheshapeofoneortheother). array_like Required out Alocationintowhichtheresultisstored.Ifprovided,itmusthaveashapethattheinputsbroadcastto. IfnotprovidedorNone,afreshly-allocatedarrayisreturned. Atuple(possibleonlyasakeywordargument)musthavelengthequaltothenumberofoutputs. ndarray,None,ortupleofndarrayandNone Optional where ValuesofTrueindicatetocalculatetheufuncatthatposition, valuesofFalseindicatetoleavethevalueintheoutputalone. array_like Optional **kwargs Forotherkeyword-onlyarguments Required Returns: out:ndarrayorscalar-Outputarray,element-wisecomparisonofx1andx2.Typicallyoftypebool,unlessdtype=objectispassed. Thisisascalarifbothx1andx2arescalars. NumPy.less()methodExample: >>>importnumpyasnp >>>np.less([2,4],[3,2]) Output: array([True,False]) Python-NumPyCodeEditor: Previous:greater_equal()function Next:less_equal()function  NewContentpublishedonw3resource: HTML-CSSPractical:Exercises,Practice,Solution JavaRegularExpression:Exercises,Practice,Solution ScalaProgrammingExercises,Practice,Solution PythonItertoolsexercises PythonNumpyexercises PythonGeoPyPackageexercises PythonPandasexercises Pythonnltkexercises PythonBeautifulSoupexercises FormTemplate Composer-PHPPackageManager PHPUnit-PHPTesting Laravel-PHPFramework Angular-JavaScriptFramework Vue-JavaScriptFramework Jest-JavaScriptTestingFramework



請為這篇文章評分?