Like other writers of his day, Whitman is privileging Nature over human learning. Whitman is essentially a Romantic, though a unique one. Writing in the American Renaissance, around the time of the Civil War, he would be inclined to value learning from direct observation of nature over that derived from books and lectures. He was a devotee of Ralph Waldo Emerson, even seeking Emerson's endorsement of the first edition of Leaves of Grass, his lifelong collection of verse.
Emerson was the writer who urged Americans to seek in Nature their happiness and the wisdom written, by the divine, in creation. This is what the speaker of the poem does. He listens to the learn'd astronomer and sees no point in repudiating any of the knowledge hard-won through study. This lecture apparently proceeds through copious presentation of details:
When the proofs, the figures, were ranged in columns before me,
When I was shown the charts and diagrams, to add, divide, and measure them,
When I sitting heard the astronomer where he lectured with much applause in the lecture-room . . .
The repetition of "when" in these lines reflects the additive quality of the lecture. Note that each line becomes progressively longer.
The speaker leaves this lecture and steps into the night air:
Till rising and gliding out I wander’d off by myself,
In the mystical moist night-air, and from time to time,
Look’d up in perfect silence at the stars.
Opposed to the learning contained in human creation (e.g., charts, diagrams, and lectures), the speaker finds the same reality in the "night-air." Looking up in perfect silence, as opposed to in the human lecture, he finds what the astronomer also hoped to find: "the stars."