numpy-100
numpy-100 copied to clipboard
Alternative solution for Q33
Hello,
As an alternative answer to Q33:
yesterday = np.datetime64('today') - 1
today = np.datetime64('today')
tomorrow = np.datetime64('today') + 1
print(yesterday, today, tomorrow)
Thanks. You're right but your solution hides the usage of timedelta64 that also offer the possibilityto subract hours, week or month (for example).