Created
August 22, 2017 07:09
-
-
Save rouseguy/3cdcf3fe0b6516608475c5f273abafe5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
def fizzbuzz(number): | |
if number % 15 == 0: | |
return np.array(["fizzbuzz"], dtype="object") | |
elif number % 5 == 0: | |
return np.array(["buzz"], dtype="object") | |
elif number % 3 == 0: | |
return np.array(["fizz"], dtype="object") | |
else: | |
return np.array([str(number)], dtype="object") | |
fizzbuzz_vectorized = np.vectorize(fizzbuzz) | |
n = 30 | |
input_data = np.array([a+1 for a in range(n)]) | |
fizzbuzz_output = fizzbuzz_vectorized(input_data).ravel() | |
fizzbuzz_output |
Sir land at super cheap sir. Please contact 9742020706
Sir water at super cheap sir. Please contact 9742020706
Sir whatsapp marketting at very much of a cheap sir. Please contact 9742020706
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Magic Holidays Ltd
Panoramic Group brings to you a truly magical Timeshare product "Magic Holidays".
The basic idea behind Magic Holidays is you can own tomorrow's holidays at today's prices. A one-time payment entitles you a week of holidaying at more than 6,500 resorts, for 25 years along with your 2 kids below 12 years of age. Further for your convenience, we have split the same into very affordable EMIs which are inflation-free.