Skip to content

Instantly share code, notes, and snippets.

@IndhumathyChelliah
Created July 27, 2020 20:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save IndhumathyChelliah/17b762e007d58688f4772bc49b961b31 to your computer and use it in GitHub Desktop.
Save IndhumathyChelliah/17b762e007d58688f4772bc49b961b31 to your computer and use it in GitHub Desktop.
import numpy as np
a=np.ones_like([1+1j,2+2j])
print (a)#Output:[1.+0.j 1.+0.j]
a1=np.ones_like([1,2])
print (a1)#Output:[1 1]
a2=np.ones_like([1.,2.])
print (a2)#Output:[1. 1.]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment