1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
spayn [35]
3 years ago
13

Write a python function genRandomVect that returns a random 1d numpy array of size (50,) where each element is an integer sample

d from [0, 100) and no two elements in the vector are the same.
Your code snippet should define the following variable:

Name Type Description
genRando function function that returns a numpy array of shape (50,) that
contains random elements on the interval [0, 100) and
no duplicates
Computers and Technology
1 answer:
SSSSS [86.1K]3 years ago
6 0

Answer:

import numpy as np

def genRandomVect():

   arr = np.random.choice(range(100),size=(50,),replace=False)

   return arr

 

print("Random 1D numpy array where each element is an integer sampled from: [0, 100) ")

print( genRandomVect() )

Explanation:

  • Create a function to create a numpy array with random integers in range[0,100) with no duplicates
  • Use the random.choice to select random values from range[0,100)  and size attribute to take the size of the required array .
  • Finally return the numpy array.

You might be interested in
What can you find the under the privacy policy section of a shopping website?
masya89 [10]

The privacy policy will tell you what the site will do with your information.

7 0
3 years ago
Which element is located on the top left of the Word screen?
victus00 [196]
The <span>element located on the top left of the Word screen is the Quick Access Toolbar.  </span>On the quick access toolbar, you can find some of the common functions that you will need to use on a regular basis, it contains commands that are used most often, for example Redo, Undo and Save etc.
7 0
3 years ago
Which of the following statements about programmed decisions is FALSE? a. Programmed decisions deal with repetitive situations.
MA_775_DIABLO [31]

Answer:

Option e: The use of programmed decisions should be limited to noncritical situations.

Explanation:

A repetitive decision or routine that can be managed by developed business  procedures or rules are known as programmed decisions. These kind of decisions are most often known for at certain points in a standard process, and are planned relying on recognized and easily identifiable terms. Programmed decisions generally do not demand much consideration or discussion, and can typically be automated to make certain consistency and save time for decision-makers.

So, the use of programmed decisions should not be limited to noncritical situations.

5 0
3 years ago
Which option ie an example of an html end tag
Kay [80]
Any end tag in HTML needs to look like this, the word body used in this example is one of the more important elements, but you can replace it to any real element in HTML:
i.e. </body>
8 0
3 years ago
Which of the following statements is true of a time management plan?
Debora [2.8K]
Omg going to say B but I might be C
5 0
3 years ago
Other questions:
  • The Warn-on-Forecast has been developed by the National Weather Service to help predict hazardous weather earlier. Which of the
    10·2 answers
  • Which equation gives you the amount of work performed?
    13·1 answer
  • How do you make a 'does not equal' symbol on the computer? you know the equal sign with a line through it..?
    6·1 answer
  • To what extent are surrounded species able to stand the anthropogenic activities?
    8·1 answer
  • If Digital Assistants are free to use why companies do spend millions of dollars to develop and support them?
    8·1 answer
  • Which of the following is not a characteristic of a good value log entry
    15·1 answer
  • H. What is recycle bin?<br>-&gt;​
    10·1 answer
  • In 5-10 sentences, describe the procedure for responding to an e-mail message.
    5·1 answer
  • How do you chose a profile pic on brainly?
    8·1 answer
  • 4.
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!