Skip to content

Commit

Permalink
Use genfromtxt instead of recfromtxt
Browse files Browse the repository at this point in the history
  • Loading branch information
atharva-2001 committed Jan 10, 2025
1 parent ffaf583 commit 06106d1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tardis/io/model/readers/generic_readers.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import numpy as np
import pandas as pd
from astropy import units as u
from numpy import recfromtxt
from numpy import genfromtxt
from radioactivedecay import Nuclide
from radioactivedecay.utils import Z_DICT, elem_to_Z

Expand Down Expand Up @@ -44,11 +44,11 @@ def read_simple_ascii_density(
time_of_model_string = fh.readline().strip()
time_of_model = parse_quantity(time_of_model_string)

data = recfromtxt(
data = genfromtxt(
fname,
skip_header=1,
names=("index", "velocity", "density"),
dtype=(int, float, float),
encoding='utf-8',
)
velocity = (data["velocity"] * u.km / u.s).to("cm/s")
mean_density = (data["density"] * u.Unit("g/cm^3"))[1:]
Expand Down

0 comments on commit 06106d1

Please sign in to comment.