I was computing the number of individual sources but with a simple snippet I am able to find 1543 instead of the claimed 1550.
id_column = np.genfromtxt(
"pantheon_shoes.dat",
usecols=(0,), # Index of the ID column
skip_header=1,
dtype=str # Load as string
)
id_column = id_column.astype(str)
id_column = np.char.strip(id_column) # Remove leading/trailing whitespace
id_column = np.char.lower(id_column) # Convert to lowercase
unique_ids, counts = np.unique(id_column, return_counts=True)
num_unique_ids = len(unique_ids)
Could any give me feedback about it?
I was computing the number of individual sources but with a simple snippet I am able to find 1543 instead of the claimed 1550.
Could any give me feedback about it?