Companion (nadīm): نَدْمَانٌ → feminine نَدْمَانَةٌ → fully declinable.
Regretful (nādim): نَدْمَانُ → feminine نَدْمَى → diptote.
This distinction comes from the book’s marginal note, not the next main-text sentence. Do not judge the word from its spelling alone.