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