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