Python: How do I create a list within an array created using an equation?

Viewed 35

I need to know how to create an array within which I can call a single number, using a single equation to populate it. Currently my code looks like this:

import numpy as np
import matplotlib as mp
import matplotlib.pyplot as plt
import scipy as sp

!pip install PYroMat #This line tells Python to import the PYroMat library
import pyromat as pm #OPTIONAL: This line renames PYroMat as "pm" to easily reference througout the notebook

pm.config["unit_pressure"] = "kPa"
# Calling properties of substances and labeling them
h20 = pm.get('mp.H2O')
air = pm.get('ig.air')
R134a = pm.get('mp.C2H2F4')

T_range_41 = np.arange(1500,1700,1)
h3_41 = [air.h(p=2100, T=T_range_41)]
print (h3_41)

But as you can see it only populates the 0 position of the array. Is there a function I can use to separate the numbers so they each occupy a single position within the array?

0 Answers
Related