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