Level 10 : What will be the output of the following code?


import numpy as np

a = np.array([1, 2, 3, 4, 5])
print(a[a > 3])

Author: KaivalyaG | Tags: numpy | 1859+ Python FAQs | Share
rollback | assert | expression | handling-missing-values-(fillna,-dropna) | format | command-line-parsing | attribute | directory-operations | binary-operation | implementation | file_handling | function-and-scope | assignment-operator | encoding | floats | binary | comparison | error-handling | exception-handling | generators | global-keyword | filter-function | functional-programming | asyncio-module | function | else | collection | global | fabs-function | constructor | class-and-inheritance | exception | gil | conversion | lambda | conditional-statements | lambdas | call | aggregating-data-with-functools.reduce() | feature | class-and-instance-variable | collections | advanced-file-operations | indexing:-loc-vs-iloc | return-statement | sorting-and-ranking | statement | shallow-copy | docstring | data-structure | string | assignment-operators | namespace | matrix-list-comprehension | built-in-modules | python-history | nested-loop | oops | arithmetic-operation | module | list,-set,-and-dictionary-comprehensions | min-function | object-attribute | init | tuple-unpacking | boolean | lists | global-variable | math-copysign | benefit | dictionary-methods | string-slicing | choice | string-method | file-handling | test-discovery | control-statement | bitwise-operator | list-mutation | operators | pickling--unpickling | threading | magic-method | while-loops | turtle | time-series-with-pandas | membership-operators-(in,-not-in) | multiprocessing | keyword | access-modifier | input-function | class | generator | booleans | pass | goto-function | zip-function | sorting | python_version | multiple-inheritance | counter-function | string-iteration | compute | reading-and-writing-files | logical-operator | bitwise-operator | sorted | methods | literal-characters-and-special-characters | round | anchors-(^,-$) | regex | list-vs-tuple | loop-control | syntax | raise-statement | application | using-assertions-(assertequal,-assertraises) | set-operation | identity-operators-(is,-is-not) | using-the-threading-module | functions | working-with-dates-and-times | decorator | while-and-for-loop | print | for | software-design | match | loop-control-statements | intering | while-else-loop | string-slicing | python-repl | sum() | regular-expression | while-loop | dictionary | parsing-with-strptime | data_structure | input | numeric | min-max-function | staticmethod | regular-expressions | immutability | logical-operator | __init_subclass__ | touples | higher-order-function | working-with-temporary-files-using-tempfile | variable | matrix | syntaxerror | comprehension | condition | objects | exponentiation | multithreading | typeerror | zfill-function | data-types | precedence | indentation | default-arguments | strings | version | mathematical-function | unit-testing | factorial-function | destructor | bitwise | overriding-methods | operator-overloading | yield | string-concatenation | invalid-list | array | escape-operator | operator | creating-and-starting-threads | iterator | thread-safe-data-structures-(queue.queue) | postfix | package-management | __future__ | round-function | slice | python-syntax-and-structure | logical-operators | using-lists-as-stacks | list-slicing | list-operation | quantifiers-(*,-+,-?,-{}) | enumerate() | reading-and-writing-large-files-efficiently | parameter | datetime.date,-datetime.time,-datetime.datetime | string-method | managing-directories-with-os-and-shutil | int | head-and-tail | list-comprehension | working-with-binary-files-(rb,-wb) | using-join()-and-is_alive()-methods | list-comprehension | version-check | type_conversion | error-handling | expand-tab | map-function | difference-between-threads-and-processes | numpy | why-use-multiprocessing-over-threading?-(gil) | identifier | arbitrary-arguments-(*args,-**kwargs) | defining-functions | data-type | using-map()-for-transformations | class-and-object | file | complex-number | recurssion | dataframe-and-series-objects | conditional-statement | counter | sum-function | arithmetic-expression | join | syntax-error | set | __all__-attribute | data-structure | id-function | exception-handling | type-conversion | polymorphism | joining-and-merging-dataframes | multiple-inheritance | thread-synchronization | classes | list-comprehensions | introduction-to-threads | basic | generators-in-python | using-os-and-pathlib-modules | encapsulation | asyncio | comment | filter | name-mangling | pep | python-operators | oop | identity-operator | boolean-masking | file-handling | data-type-conversions | datatype | data-type | sys | swapping | type-conversion-and-casting | formatting-with-strftime | python-module | using-else-and-finally | error | global-variable | built-in-function | math | slicing | sys-module | scientific-notation | single-inheritance | interpreter | lambda-function | import-method | precedence-and-associativity | operator-or | using-yield-in-functions | formal-and-actual-parameter | indexing | with-statement | heap-memory | tuple-methods | recursion | center | inherit | append | data-structures-in-python | working-with-file-paths | built-in | boolean-and-non-boolean | memory-management | lambda-functions | list-indexing | string-formatting | sets | string-manipulation | async | pseudocode | thread | descriptors | virtual-environment | function-argument | walking-through-directories-using-os.walk() | list-methods-and-slicing | introduction-to-multiprocessing | floating-point-precision | dicts | loop | class-decorators | frozenset | control-flow | update | decimal | string-formatting | python | conditional-statement | odd-number | else-statement | matplotlib | mutable | max-min | data-structures | library | namedtuple | print-statement | filtering-and-indexing | def | raise | functional-programming | virtual-environment | type-conversion | key-value-pairs | python-django | identity-operator | tuple | design-principle | creating-custom-modules | copy | inheritance | static-method | random | loops | method-overloading | introduction-to-python | string-methods | integers | memory | iterable | opening-files-(open()) | iterators | mysql | default-mutable-argument | operand | input-function | datetime | control-flow | deep-copy | list-join | installation | list | context-manager | split | stack | random-function | dictionary-comprehensions | mapping-function | built-in-function | complex | integer | immutable-data-type | debugging | operations | syntax-error | logical-operation | operator-and | dictionaries | method | reading:-read(),-readline(),-readlines() | zip | tuples | list-method | multiple-except-blocks | pandas | range | overflow | mathematics | writing:-write(),-writelines() ...